Skip to content

Commit

Permalink
Fix packed decimal left shift skipping
Browse files Browse the repository at this point in the history
With vector packed decimal instructions, i2pd and l2pd conversions and
truncations can be done in one instruction. Thus, the
pdshlOverflow above i2pd or l2pd nodes can be omitted.

This change makes sure we skip the left shift only if the
i2pd or l2pd is an unevaluated single reference node.

Signed-off-by: Nigel Yu <[email protected]>
  • Loading branch information
NigelYiboYu committed Oct 19, 2017
1 parent 163bdfc commit a3cc5dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/tr.source/trj9/z/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23201,7 +23201,8 @@ J9::Z::TreeEvaluator::pdshlVectorEvaluatorHelper(TR::Node *node, TR::CodeGenerat
// skip the shift and just return i2pd results.
bool isSkipShift = node->getOpCodeValue() == TR::pdshlOverflow &&
(firstChild->getOpCodeValue() == TR::i2pd ||
firstChild->getOpCodeValue() == TR::l2pd);
firstChild->getOpCodeValue() == TR::l2pd) &&
firstChild->isSingleRefUnevaluated();

int32_t shiftAmount = (int32_t)shiftAmountNode->get64bitIntegralValue();
uint8_t decimalPrecision = node->getDecimalPrecision();
Expand Down

0 comments on commit a3cc5dd

Please sign in to comment.