We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7880dec commit 43d0a00Copy full SHA for 43d0a00
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -51,7 +51,7 @@ PoisonFlags::PoisonFlags(const Instruction *I) {
51
NNeg = false;
52
if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(I)) {
53
NUW = OBO->hasNoUnsignedWrap();
54
- NSW = OBO->hasNoUnsignedWrap();
+ NSW = OBO->hasNoSignedWrap();
55
}
56
if (auto *PEO = dyn_cast<PossiblyExactOperator>(I))
57
Exact = PEO->isExact();
@@ -64,7 +64,7 @@ PoisonFlags::PoisonFlags(const Instruction *I) {
64
void PoisonFlags::apply(Instruction *I) {
65
if (isa<OverflowingBinaryOperator>(I)) {
66
I->setHasNoUnsignedWrap(NUW);
67
- I->setHasNoUnsignedWrap(NSW);
+ I->setHasNoSignedWrap(NSW);
68
69
if (isa<PossiblyExactOperator>(I))
70
I->setIsExact(Exact);
0 commit comments