llvm-project/llvm/test/CodeGen/BPF
Yonghong Song 04ccfda075 bpf: add missing RegState to notify MachineInstr verifier necessary register usage
Errors like the following are reported by:

  https://urldefense.proofpoint.com/v2/url?u=http-3A__lab.llvm.org-3A8011_builders_llvm-2Dclang-2Dx86-5F64-2Dexpensive-2Dchecks-2Dwin_builds_11261&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=929oWPCf7Bf2qQnir4GBtowB8ZAlIRWsAdTfRkDaK-g&s=9k-wbEUVpUm474hhzsmAO29VXVvbxJPWD9RTgCD71fQ&e=

  *** Bad machine code: Explicit definition marked as use ***
  - function:    cal_align1
  - basic block: %bb.0 entry (0x47edd98)
  - instruction: LDB $r3, $r2, 0
  - operand 0:   $r3

This is because RegState info was missing for ScratchReg inside
expandMEMCPY. This caused incomplete register usage information to
MachineInstr verifier which then would complain as there could be potential
code-gen issue if the complained MachineInstr is used in place where
register usage information matters even though the memcpy expanding is not
in such case as it happens at the last stage of IR optimization pipeline.

We should always specify those register usage information which compiler
couldn't deduct automatically whenever we add a hardware register manually.

Reported-by: Builder llvm-clang-x86_64-expensive-checks-win Build #11261
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Yonghong Song <yhs@fb.com>
llvm-svn: 338134
2018-07-27 16:58:52 +00:00
..
32-bit-subreg-alu.ll bpf: New codegen testcases for 32-bit subregister support 2018-02-23 23:49:33 +00:00
32-bit-subreg-cond-select.ll bpf: New codegen testcases for 32-bit subregister support 2018-02-23 23:49:33 +00:00
32-bit-subreg-load-store.ll bpf: New codegen testcases for 32-bit subregister support 2018-02-23 23:49:33 +00:00
32-bit-subreg-peephole.ll bpf: fix incorrect SELECT_CC lowering 2018-04-03 03:56:37 +00:00
alu8.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
atomics.ll
basictest.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
byval.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
cc_args.ll [bpf] allow direct and indirect calls 2017-11-19 01:35:00 +00:00
cc_args_be.ll [bpf] allow direct and indirect calls 2017-11-19 01:35:00 +00:00
cc_ret.ll [bpf] allow direct and indirect calls 2017-11-19 01:35:00 +00:00
cmp.ll bpf: fix incorrect SELECT_CC lowering 2018-04-03 03:56:37 +00:00
dwarfdump.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
ex1.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
fi_ri.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
inline_asm.ll
intrinsics.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
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 bpf: add missing RegState to notify MachineInstr verifier necessary register usage 2018-07-27 16:58:52 +00:00
objdump_atomics.ll
objdump_cond_op.ll bpf: print backward branch target properly 2017-11-16 19:15:36 +00:00
objdump_cond_op_2.ll bpf: print backward branch target properly 2017-11-16 19:15:36 +00:00
objdump_imm_hex.ll bpf: add support for objdump -print-imm-hex 2017-12-20 19:39:58 +00:00
objdump_intrinsics.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
objdump_trivial.ll
reloc.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
remove_truncate_1.ll
remove_truncate_2.ll
remove_truncate_3.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
remove_truncate_4.ll [BPF] Teach DAG2DAG AND elimination about load intrinsics 2018-01-16 07:27:19 +00:00
remove_truncate_5.ll bpf: fix a bug in dag2dag optimization for loads from readonly section 2018-02-15 17:06:45 +00:00
rodata_1.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
rodata_2.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
rodata_3.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
rodata_4.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
sanity.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
sdiv_error.ll
select_ri.ll bpf: fix incorrect SELECT_CC lowering 2018-04-03 03:56:37 +00:00
setcc.ll
shifts.ll [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
sockex2.ll Followup on Proposal to move MIR physical register namespace to '$' sigil. 2018-01-31 22:04:26 +00:00
struct_ret1.ll
struct_ret2.ll
undef.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
vararg1.ll
warn-call.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
warn-stack.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00