[PATCH] D158510: [InstCombine] Propagate nsw flag when negating
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 09:41:03 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp:306
// `freeze` is negatible if its operand is negatible.
- Value *NegOp = negate(I->getOperand(0), Depth + 1);
+ Value *NegOp = negate(I->getOperand(0), /* IsNSW */ false, Depth + 1);
if (!NegOp) // Early return.
----------------
Why does freeze kill `nsw`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158510/new/
https://reviews.llvm.org/D158510
More information about the llvm-commits
mailing list