[PATCH] D136529: [DAG] canCreateUndefOrPoison - add support for SRA/SRL shift opcode (WIP)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 22 08:16:41 PDT 2022


RKSimon created this revision.
RKSimon added reviewers: craig.topper, foad, spatel.
Herald added subscribers: kosarev, StephenFan, frasercrmck, kerbowa, 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, jvesely.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added subscribers: pcwang-thead, MaskRay.
Herald added a project: LLVM.

Right shifts won't create undef/poison if they are exact with inrange shift amounts.

Matches handling in Operator::hasPoisonGeneratingFlags()

WIP: There are still a few regression cases to handle (either other missing opcodes or we are freezing ops that we can't push the freeze through multiple operands), but I'm cleaning out old branches and wanted to get this up for future reference.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136529

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/AMDGPU/sdiv64.ll
  llvm/test/CodeGen/AMDGPU/srem64.ll
  llvm/test/CodeGen/AMDGPU/udiv64.ll
  llvm/test/CodeGen/RISCV/rv64zbb.ll
  llvm/test/CodeGen/X86/freeze-binary.ll
  llvm/test/CodeGen/X86/midpoint-int-vec-512.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136529.469902.patch
Type: text/x-patch
Size: 58549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221022/1ffee85e/attachment-0001.bin>


More information about the llvm-commits mailing list