[PATCH] D73985: [bpf] zero extension is required in BPF implementaiton so remove <<=32 >>=32

John Fastabend via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 16:23:26 PDT 2020


jrfastab updated this revision to Diff 266368.
jrfastab added a comment.

Update BPFMIPeephole.cpp to remove incorrect MOV_32_64 and MOV_rr_32 instruction elimination
which should not be done because these insns have side effects. I left the MOV_rr case in
place for now but may remove it later after doing some more digging to see if this case
ever pops up in our code.

Also updated tests to catch zext using MOV_* instructions now. I converted the CHECK <<=32 >==32
cases to CHECK-NOT to ensure we no longer generate these lines.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73985/new/

https://reviews.llvm.org/D73985

Files:
  llvm/lib/Target/BPF/BPFISelLowering.cpp
  llvm/lib/Target/BPF/BPFInstrInfo.td
  llvm/lib/Target/BPF/BPFMIPeephole.cpp
  llvm/test/CodeGen/BPF/32-bit-subreg-cond-select.ll
  llvm/test/CodeGen/BPF/32-bit-subreg-peephole-phi-1.ll
  llvm/test/CodeGen/BPF/32-bit-subreg-peephole-phi-2.ll
  llvm/test/CodeGen/BPF/32-bit-subreg-peephole-phi-3.ll
  llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
  llvm/test/CodeGen/BPF/32-bit-subreg-zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73985.266368.patch
Type: text/x-patch
Size: 8424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200526/78340210/attachment.bin>


More information about the llvm-commits mailing list