[PATCH] D153846: [SelectionDAG] do not fold (sext i32 undef to i64) to 0

Mohammed Nurul Hoque via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 02:07:17 PDT 2023


mohammed-nurulhoque created this revision.
Herald added subscribers: luke, frasercrmck, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, nemanjai, qcolombet.
Herald added a project: All.
mohammed-nurulhoque requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, MaskRay.
Herald added a project: LLVM.

When sign-extending i32 undef to i64, previously it was folded to 0. Replace with i64 undef. This eliminates instructions that set undefined ABI registers to 0


https://reviews.llvm.org/D153846

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/AArch64/abd-combine.ll
  llvm/test/CodeGen/AArch64/hadd-combine.ll
  llvm/test/CodeGen/AArch64/neon-dotreduce.ll
  llvm/test/CodeGen/PowerPC/p10-spill-crun.ll
  llvm/test/CodeGen/RISCV/miss-sp-restore-eh.ll
  llvm/test/CodeGen/RISCV/pr51206.ll
  llvm/test/CodeGen/RISCV/sext-zext-trunc.ll
  llvm/test/CodeGen/X86/vector-shuffle-v1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153846.534873.patch
Type: text/x-patch
Size: 12655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230627/1a491c5a/attachment.bin>


More information about the llvm-commits mailing list