llvm-project/llvm/test/CodeGen/BPF
Yonghong Song d96c1bbaa0 [BPF] disable ReduceLoadWidth during SelectionDag phase
The compiler may transform the following code
  ctx = ctx + reloc_offset
  ... (*(u32 *)ctx) & 0x8000 ...
to
  ctx = ctx + reloc_offset
  ... (*(u8 *)(ctx + 1)) & 0x80 ...
where reloc_offset will be replaced with a constant during
AsmPrinter phase.

The above transformed code will be rejected the kernel verifier
as it does not allow
  *(type *)((ctx + non_zero_offset1) + non_zero_offset2)
style access pattern.

It is hard at SelectionDag phase to identify whether a load
is related to context or not. Sometime, interprocedure analysis
may be needed. So let us simply prevent such optimization
from happening.

Differential Revision: https://reviews.llvm.org/D73997
2020-02-04 18:37:43 -08:00
..
BTF [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs 2020-01-10 09:06:31 -08:00
CORE [BPF] disable ReduceLoadWidth during SelectionDag phase 2020-02-04 18:37:43 -08:00
32-bit-subreg-alu.ll [BPF] turn on -mattr=+alu32 for cpu version v3 and later 2019-11-07 22:08:46 -08:00
32-bit-subreg-cond-select.ll [BPF] Fix a bug in peephole optimization 2019-11-20 15:19:59 -08:00
32-bit-subreg-load-store.ll
32-bit-subreg-peephole-phi-1.ll [BPF] Fix a bug in peephole optimization 2019-11-20 15:19:59 -08:00
32-bit-subreg-peephole-phi-2.ll [BPF] Fix a bug in peephole optimization 2019-11-20 15:19:59 -08:00
32-bit-subreg-peephole-phi-3.ll [BPF] Fix a recursion bug in BPF Peephole ZEXT optimization 2019-11-22 08:05:43 -08:00
32-bit-subreg-peephole.ll [BPF] Fix a bug in peephole optimization 2019-11-20 15:19:59 -08:00
alu8.ll
atomics.ll
basictest.ll
byval.ll
callx.ll [BPF] fix indirect call assembly code 2019-10-21 03:22:03 +00:00
cc_args.ll
cc_args_be.ll
cc_ret.ll
cmp.ll
dwarfdump.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
elf-symbol-information.ll
ex1.ll
fi_ri.ll
inline_asm.ll
inlineasm-output-template.ll [AsmPrinter] refactor to support %c w/ GlobalAddress' 2019-04-26 18:45:04 +00:00
intrinsics.ll
lit.local.cfg
load.ll
loops.ll
many_args1.ll
many_args2.ll
mem_offset.ll
mem_offset_be.ll
memcpy-expand-in-order.ll
objdump_atomics.ll
objdump_cond_op.ll
objdump_cond_op_2.ll
objdump_imm_hex.ll
objdump_intrinsics.ll
objdump_static_var.ll
objdump_trivial.ll
objdump_two_funcs.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
optnone-1.ll [BPF] fix a bug in BPFMISimplifyPatchable pass with -O0 2020-01-30 08:28:39 -08:00
reloc-btf-2.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
reloc-btf.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
reloc.ll [llvm-objdump] - Print relocation record in a GNU format. 2019-05-07 13:14:18 +00:00
remove_truncate_1.ll
remove_truncate_2.ll
remove_truncate_3.ll
remove_truncate_4.ll
remove_truncate_5.ll
remove_truncate_6.ll bpf: fix wrong truncation elimination when there is back-edge/loop 2019-10-16 15:27:59 +00:00
rodata_1.ll
rodata_2.ll
rodata_3.ll
rodata_4.ll
sanity.ll
sdiv_error.ll Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
select_ri.ll
setcc.ll
shifts.ll [SelectionDAG] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526) 2020-01-13 11:08:12 +00:00
sockex2.ll
struct_ret1.ll
struct_ret2.ll
undef.ll [DAGCombiner] If a TokenFactor would be merged into its user, consider the user later. 2019-03-13 17:07:09 +00:00
vararg1.ll
warn-call.ll
warn-stack.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
xadd.ll Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
xadd_legal.ll