File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ static bool refineInstruction(SCCPSolver &Solver,
120
120
};
121
121
122
122
if (isa<OverflowingBinaryOperator>(Inst)) {
123
+ if (Inst.hasNoSignedWrap () && Inst.hasNoUnsignedWrap ())
124
+ return false ;
125
+
123
126
auto RangeA = GetRange (Inst.getOperand (0 ));
124
127
auto RangeB = GetRange (Inst.getOperand (1 ));
125
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
+ return false ;
155
+
150
156
auto Range = GetRange (Inst.getOperand (0 ));
151
157
uint64_t DestWidth = TI->getDestTy ()->getScalarSizeInBits ();
152
158
if (!TI->hasNoUnsignedWrap ()) {
You can’t perform that action at this time.
0 commit comments