Skip to content

Commit 6960b63

Browse files
committed
[LSR] Use getSigned() for negated immediate
1 parent 005ef5c commit 6960b63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5805,7 +5805,7 @@ Value *LSRInstance::Expand(const LSRUse &LU, const LSRFixup &LF,
58055805
// negated immediate.
58065806
if (!ICmpScaledV)
58075807
ICmpScaledV =
5808-
ConstantInt::get(IntTy, -(uint64_t)Offset.getFixedValue());
5808+
ConstantInt::getSigned(IntTy, -(uint64_t)Offset.getFixedValue());
58095809
else {
58105810
Ops.push_back(SE.getUnknown(ICmpScaledV));
58115811
ICmpScaledV = ConstantInt::get(IntTy, Offset.getFixedValue());

0 commit comments

Comments
 (0)