Skip to content

Commit 7f67e4c

Browse files
nikicakiramenai
authored andcommitted
[ConstantFolding] Use getSigned()
Split out from llvm/llvm-project#80309.
1 parent d1cbfde commit 7f67e4c

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

34043404
// The exponent is an "unspecified value" for inf/nan. We use zero to avoid
34053405
// using undef.
3406-
Constant *Result1 = FrexpMant.isFinite() ? ConstantInt::get(IntTy, FrexpExp)
3407-
: ConstantInt::getNullValue(IntTy);
3406+
Constant *Result1 = FrexpMant.isFinite()
3407+
? ConstantInt::getSigned(IntTy, FrexpExp)
3408+
: ConstantInt::getNullValue(IntTy);
34083409
return {Result0, Result1};
34093410
}
34103411

0 commit comments

Comments
 (0)