Skip to content

Commit e35c402

Browse files
committed
[ValueTracking] Fix a bug for signed min-max clamping
This is the fix of the bug present in PR 120576.
1 parent d52fc5a commit e35c402

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,8 @@ static void unionWithMinMaxIntrinsicClamp(const IntrinsicInst *II,
11191119
KnownBits &Known) {
11201120
const APInt *CLow, *CHigh;
11211121
if (isSignedMinMaxIntrinsicClamp(II, CLow, CHigh))
1122-
Known = Known.unionWith(ConstantRange::getNonEmpty(*CLow, *CHigh + 1).toKnownBits());
1122+
Known = Known.unionWith(
1123+
ConstantRange::getNonEmpty(*CLow, *CHigh + 1).toKnownBits());
11231124
}
11241125

11251126
static void computeKnownBitsFromOperator(const Operator *I,

0 commit comments

Comments
 (0)