[PATCH] D122299: [InstCombine] Fix missing nsw flag when fold -(x-y) to y-x
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 05:31:48 PDT 2022
bcl5980 added a comment.
Thanks again @lebedev.ri. I will update the code to
bool NSW = I->hasNoSignedWrap() && HasNSW && IsTrulyNegation && Depth == 0;
return Builder.CreateSub(I->getOperand(1), I->getOperand(0),
I->getName() + ".neg", false, NSW);
but if there is no other comments I prefer to abandon it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122299/new/
https://reviews.llvm.org/D122299
More information about the llvm-commits
mailing list