[PATCH] D132658: [InstCombine] Distributive or+mul with const operand
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 05:51:33 PDT 2022
bcl5980 added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:239
+ auto *BO = BinaryOperator::CreateAdd(NewMul, Mul);
+ if (OrNUW)
+ cast<BinaryOperator>(NewMul)->setHasNoUnsignedWrap();
----------------
Should be
```
if (I.hasNoUnsignedWrap() && OrNUW) {
cast<BinaryOperator>(NewMul)->setHasNoUnsignedWrap();
BO->setHasNoUnsignedWrap();
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132658/new/
https://reviews.llvm.org/D132658
More information about the llvm-commits
mailing list