Skip to content

Commit

Permalink
[ConstantFolding] Use getSigned()
Browse files Browse the repository at this point in the history
Split out from #80309.
  • Loading branch information
nikic committed Aug 12, 2024
1 parent dc831e8 commit 246c236
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/Analysis/ConstantFolding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3400,8 +3400,9 @@ ConstantFoldScalarFrexpCall(Constant *Op, Type *IntTy) {

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

Expand Down

0 comments on commit 246c236

Please sign in to comment.