Skip to content

Commit 94f34bc

Browse files
nikicakiramenai
authored andcommitted
[ConstantFolding] Use getSigned()
Split out from llvm/llvm-project#80309.
1 parent 25b6a07 commit 94f34bc

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
@@ -3706,8 +3706,9 @@ ConstantFoldScalarFrexpCall(Constant *Op, Type *IntTy) {
37063706

37073707
// The exponent is an "unspecified value" for inf/nan. We use zero to avoid
37083708
// using undef.
3709-
Constant *Result1 = FrexpMant.isFinite() ? ConstantInt::get(IntTy, FrexpExp)
3710-
: ConstantInt::getNullValue(IntTy);
3709+
Constant *Result1 = FrexpMant.isFinite()
3710+
? ConstantInt::getSigned(IntTy, FrexpExp)
3711+
: ConstantInt::getNullValue(IntTy);
37113712
return {Result0, Result1};
37123713
}
37133714

0 commit comments

Comments
 (0)