From 568b22e2947173cd37f303ae85bea82582b8ed3b Mon Sep 17 00:00:00 2001 From: Annabelle Huo Date: Mon, 15 Apr 2024 13:15:10 -0400 Subject: [PATCH] Update differenceInAdditiveConstants as int64_t `differenceInAdditiveConstants` is expected to be a 64 bit integer. `examineOpCodesForInductionVariableUse` takes care of casting it into `int32_t` if it does not use aladd and the adjustment or the replacing node is not a 64-bit value. Fixes: eclipse-openj9/openj9#19220 Signed-off-by: Annabelle Huo --- compiler/optimizer/InductionVariable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/optimizer/InductionVariable.cpp b/compiler/optimizer/InductionVariable.cpp index c2457900001..880e77f1cd0 100644 --- a/compiler/optimizer/InductionVariable.cpp +++ b/compiler/optimizer/InductionVariable.cpp @@ -2175,9 +2175,9 @@ bool TR_LoopStrider::examineTreeForInductionVariableUse(TR::Block *loopInvariant seenInductionVariableComputation = true; examineChildren = false; - int32_t differenceInAdditiveConstants = 0; + int64_t differenceInAdditiveConstants = 0; if (isAdditiveTermConst(index)) - differenceInAdditiveConstants = (int32_t)(-1*getAdditiveTermConst(index)); + differenceInAdditiveConstants = (-1*getAdditiveTermConst(index)); examineOpCodesForInductionVariableUse(node, parent, childNum, index, originalNode, replacingNode, linearTerm, mulTerm, newSymbolReference, loopInvariantBlock, pinningArrayPointer, differenceInAdditiveConstants, isInternalPointer, downcastNode, usingAladd);