[PATCH] D130680: [IntegerDivision][AMDGPU] Use CreateLogicalOr to block poison propagation.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 21:50:11 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: arsenm, efriedma, spatel, nikic, aqjune.
Herald added subscribers: kosarev, StephenFan, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

There are two ctlz intrinsics here with the zero_is_poison flag
set. There are also two comparisons that check if either of the
inputs the ctlzs are zero. We need to use a logical or to block
the poison from the ctlz if either of the inputs is zero.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130680

Files:
  llvm/lib/Transforms/Utils/IntegerDivision.cpp
  llvm/test/CodeGen/AMDGPU/sdiv64.ll
  llvm/test/CodeGen/AMDGPU/srem64.ll
  llvm/test/CodeGen/AMDGPU/udiv64.ll
  llvm/test/CodeGen/AMDGPU/urem64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130680.448233.patch
Type: text/x-patch
Size: 23111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220728/ae61a7f1/attachment.bin>


More information about the llvm-commits mailing list