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 ec93ce5 commit 28941e8Copy full SHA for 28941e8
llvm/lib/Transforms/Utils/SCCPSolver.cpp
@@ -120,6 +120,9 @@ static bool refineInstruction(SCCPSolver &Solver,
120
};
121
122
if (isa<OverflowingBinaryOperator>(Inst)) {
123
+ if (Inst.hasNoSignedWrap() && Inst.hasNoUnsignedWrap())
124
+ return false;
125
+
126
auto RangeA = GetRange(Inst.getOperand(0));
127
auto RangeB = GetRange(Inst.getOperand(1));
128
if (!Inst.hasNoUnsignedWrap()) {
@@ -147,6 +150,9 @@ static bool refineInstruction(SCCPSolver &Solver,
147
150
Changed = true;
148
151
}
149
152
} else if (TruncInst *TI = dyn_cast<TruncInst>(&Inst)) {
153
+ if (TI->hasNoSignedWrap() && TI->hasNoUnsignedWrap())
154
155
156
auto Range = GetRange(Inst.getOperand(0));
157
uint64_t DestWidth = TI->getDestTy()->getScalarSizeInBits();
158
if (!TI->hasNoUnsignedWrap()) {
0 commit comments