Skip to content

Commit 3ca865a

Browse files
AZero13dtcxzyw
andauthored
Update InstCombineSelect.cpp
Co-authored-by: Yingwei Zheng <[email protected]>
1 parent 860f531 commit 3ca865a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,8 +1172,8 @@ static Value *canonicalizeSaturatedAddSigned(ICmpInst *Cmp, Value *TVal,
11721172
if (Pred == ICmpInst::ICMP_SGE) {
11731173
if (auto Flipped = getFlippedStrictnessPredicateAndConstant(
11741174
Pred, cast<Constant>(Cmp1))) {
1175-
if (auto *CI = dyn_cast<ConstantInt>(Flipped->second))
1176-
FlippedC = &CI->getValue();
1175+
Pred = Flipped->first;
1176+
Cmp1 = Flipped->second;
11771177
}
11781178
}
11791179

0 commit comments

Comments
 (0)