[PATCH] D74101: [BPF] implement isTruncateFree and isZExtFree in BPFTargetLowering

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 23:01:21 PST 2020


yonghong-song updated this revision to Diff 243742.
yonghong-song added a comment.

make isTruncateFree more like AArch64 one. Remove !getHasAlu32() from isTruncateFree where it is not needed. But !getHasAlu32() is still needed in isZExtFree. Otherwise, we will get a llvm assertion like:

    CLNG-LLC [test_maps] test_xdp_noinline.o
  llc: ../lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:978: void {anonymous}::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*): Assertion `(TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) == TargetLowering::TypeLegal || Op.getOpcode() == ISD::TargetConstant || Op.getOpcode() == ISD::Register) && "Unexpected illegal type!"' failed.
  Stack dump:
  0.      Program arguments: llc -march=bpf -mcpu=v2 -filetype=obj -o /data/users/yhs/work/net-next/tools/testing/selftests/bpf/no_alu32/test_xdp_noinline.$


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74101

Files:
  llvm/lib/Target/BPF/BPFISelLowering.cpp
  llvm/lib/Target/BPF/BPFISelLowering.h
  llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll
  llvm/test/CodeGen/BPF/is_trunc_free.ll
  llvm/test/CodeGen/BPF/is_zext_free.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74101.243742.patch
Type: text/x-patch
Size: 10412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/f219ad5c/attachment.bin>


More information about the llvm-commits mailing list