[PATCH] D98410: [ConstantFold] Handle undef/poison when constant folding smul_fix/smul_fix_sat

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 03:58:44 PST 2021


bjope created this revision.
bjope added reviewers: nikic, aqjune, nagisa.
Herald added a subscriber: hiraditya.
bjope requested review of this revision.
Herald added a project: LLVM.

Do constant folding according to

  posion * C -> poison
  C * poison -> poison
  undef * C -> 0
  C * undef -> 0

for smul_fix and smul_fix_sat intrinsics (for any scale).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98410

Files:
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/test/Transforms/InstSimplify/ConstProp/smul-fix-sat.ll
  llvm/test/Transforms/InstSimplify/ConstProp/smul-fix.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98410.329911.patch
Type: text/x-patch
Size: 6428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210311/9bce6d39/attachment.bin>


More information about the llvm-commits mailing list