Skip to content

Commit 246c236

Browse files
committed
[ConstantFolding] Use getSigned()
Split out from #80309.
1 parent dc831e8 commit 246c236

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,8 +3400,9 @@ ConstantFoldScalarFrexpCall(Constant *Op, Type *IntTy) {
34003400

34013401
// The exponent is an "unspecified value" for inf/nan. We use zero to avoid
34023402
// using undef.
3403-
Constant *Result1 = FrexpMant.isFinite() ? ConstantInt::get(IntTy, FrexpExp)
3404-
: ConstantInt::getNullValue(IntTy);
3403+
Constant *Result1 = FrexpMant.isFinite()
3404+
? ConstantInt::getSigned(IntTy, FrexpExp)
3405+
: ConstantInt::getNullValue(IntTy);
34053406
return {Result0, Result1};
34063407
}
34073408

0 commit comments

Comments
 (0)