Skip to content

Commit

Permalink
Update differenceInAdditiveConstants as int64_t
Browse files Browse the repository at this point in the history
`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 <Annabelle.Huo@ibm.com>
  • Loading branch information
a7ehuo committed Apr 16, 2024
1 parent 2f492f4 commit 568b22e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/optimizer/InductionVariable.cpp
Expand Up @@ -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);

Expand Down

0 comments on commit 568b22e

Please sign in to comment.