Skip to content

Commit 751de4c

Browse files
committed
Clarify casting of MulVector[...]
1 parent a151fdc commit 751de4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3845,7 +3845,7 @@ static Constant *ConstantFoldFixedVectorCall(
38453845
MulVector[I] = Elt0->getSExtValue() * Elt1->getSExtValue();
38463846
}
38473847
for (unsigned I = 0; I < Result.size(); I++) {
3848-
int64_t IAdd = (int64_t)MulVector[I * 2] + MulVector[I * 2 + 1];
3848+
int64_t IAdd = (int64_t)MulVector[I * 2] + (int64_t)MulVector[I * 2 + 1];
38493849
Result[I] = ConstantInt::get(Ty, IAdd);
38503850
}
38513851

0 commit comments

Comments
 (0)