@@ -10259,12 +10259,7 @@ TR::Node *ishlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1025910259 if (identity)
1026010260 return identity;
1026110261
10262- // Replace shift of constant zero with constant zero
10263- if (firstChild->getOpCode().isLoadConst() && firstChild->getInt() == 0)
10264- {
10265- return s->replaceNode(node, firstChild, s->_curTree);
10266- }
10267- else if (secondChild->getOpCode().isLoadConst() &&
10262+ if (secondChild->getOpCode().isLoadConst() &&
1026810263 performTransformation(s->comp(), "%sChanged ishl by const into imul by const in node [%s]\n", s->optDetailString(), node->getName(s->getDebug())))
1026910264 {
1027010265 // Normalize shift by a constant into multiply by a constant
@@ -10306,12 +10301,7 @@ TR::Node *lshlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1030610301 if (identity)
1030710302 return identity;
1030810303
10309- // Replace shift of constant zero with constant zero
10310- if (firstChild->getOpCode().isLoadConst() && firstChild->getLongInt() == 0)
10311- {
10312- return s->replaceNode(node, firstChild, s->_curTree);
10313- }
10314- else if (secondChild->getOpCode().isLoadConst())
10304+ if (secondChild->getOpCode().isLoadConst())
1031510305 {
1031610306 // Canonicalize shift by a constant into multiply by a constant
1031710307 //
@@ -10355,12 +10345,6 @@ TR::Node *bshlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1035510345 if (identity)
1035610346 return identity;
1035710347
10358- // Replace shift of constant zero with constant zero
10359- if (firstChild->getOpCode().isLoadConst() && firstChild->getByte() == 0)
10360- {
10361- return s->replaceNode(node, firstChild, s->_curTree);
10362- }
10363-
1036410348 return node;
1036510349 }
1036610350
@@ -10381,12 +10365,6 @@ TR::Node *sshlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1038110365 if (identity)
1038210366 return identity;
1038310367
10384- // Replace shift of constant zero with constant zero
10385- if (firstChild->getOpCode().isLoadConst() && firstChild->getShortInt() == 0)
10386- {
10387- return s->replaceNode(node, firstChild, s->_curTree);
10388- }
10389-
1039010368 return node;
1039110369 }
1039210370
@@ -10413,13 +10391,7 @@ TR::Node *ishrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1041310391 if (identity)
1041410392 return identity;
1041510393
10416- // Replace shift of constant zero with constant zero
10417- if (firstChild->getOpCode().isLoadConst() && firstChild->getInt() == 0)
10418- {
10419- return s->replaceNode(node, firstChild, s->_curTree);
10420- }
10421- else
10422- normalizeShiftAmount(node, 31, s);
10394+ normalizeShiftAmount(node, 31, s);
1042310395
1042410396 return node;
1042510397 }
@@ -10443,13 +10415,7 @@ TR::Node *lshrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1044310415 if (identity)
1044410416 return identity;
1044510417
10446- // Replace shift of constant zero with constant zero
10447- if (firstChild->getOpCode().isLoadConst() && firstChild->getLongInt() == 0)
10448- {
10449- return s->replaceNode(node, firstChild, s->_curTree);
10450- }
10451- else
10452- normalizeShiftAmount(node, 63, s);
10418+ normalizeShiftAmount(node, 63, s);
1045310419
1045410420 return node;
1045510421 }
@@ -10471,12 +10437,6 @@ TR::Node *bshrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1047110437 if (identity)
1047210438 return identity;
1047310439
10474- // Replace shift of constant zero with constant zero
10475- if (firstChild->getOpCode().isLoadConst() && firstChild->getByte() == 0)
10476- {
10477- return s->replaceNode(node, firstChild, s->_curTree);
10478- }
10479-
1048010440 return node;
1048110441 }
1048210442
@@ -10497,12 +10457,6 @@ TR::Node *sshrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1049710457 if (identity)
1049810458 return identity;
1049910459
10500- // Replace shift of constant zero with constant zero
10501- if (firstChild->getOpCode().isLoadConst() && firstChild->getShortInt() == 0)
10502- {
10503- return s->replaceNode(node, firstChild, s->_curTree);
10504- }
10505-
1050610460 return node;
1050710461 }
1050810462
@@ -10595,13 +10549,7 @@ TR::Node *iushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
1059510549 }
1059610550 }
1059710551
10598- // Replace shift of constant zero with constant zero
10599- if (firstChild->getOpCode().isLoadConst() && firstChild->getUnsignedInt() == 0)
10600- {
10601- return s->replaceNode(node, firstChild, s->_curTree);
10602- }
10603- else
10604- normalizeShiftAmount(node, 31, s);
10552+ normalizeShiftAmount(node, 31, s);
1060510553
1060610554 return node;
1060710555 }
@@ -10743,13 +10691,7 @@ TR::Node *lushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
1074310691 }
1074410692 }
1074510693
10746- // Replace shift of constant zero with constant zero
10747- if (firstChild->getOpCode().isLoadConst() && firstChild->getUnsignedLongInt() == 0)
10748- {
10749- return s->replaceNode(node, firstChild, s->_curTree);
10750- }
10751- else
10752- normalizeShiftAmount(node, 63, s);
10694+ normalizeShiftAmount(node, 63, s);
1075310695
1075410696 return node;
1075510697 }
@@ -10771,12 +10713,6 @@ TR::Node *bushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
1077110713 if (identity)
1077210714 return identity;
1077310715
10774- // Replace shift of constant zero with constant zero
10775- if (firstChild->getOpCode().isLoadConst() && firstChild->getUnsignedByte() == 0)
10776- {
10777- return s->replaceNode(node, firstChild, s->_curTree);
10778- }
10779-
1078010716 return node;
1078110717 }
1078210718
@@ -10797,12 +10733,6 @@ TR::Node *sushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
1079710733 if (identity)
1079810734 return identity;
1079910735
10800- // Replace shift of constant zero with constant zero
10801- if (firstChild->getOpCode().isLoadConst() && firstChild->getUnsignedShortInt() == 0)
10802- {
10803- return s->replaceNode(node, firstChild, s->_curTree);
10804- }
10805-
1080610736 return node;
1080710737 }
1080810738
@@ -10831,13 +10761,7 @@ TR::Node *irolSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1083110761 return s->replaceNode(node, firstChild, s->_curTree);
1083210762 }
1083310763
10834- // Replace rotate of constant zero with constant zero
10835- if (firstChild->getOpCode().isLoadConst() && firstChild->getInt() == 0)
10836- {
10837- return s->replaceNode(node, firstChild, s->_curTree);
10838- }
10839- else
10840- normalizeShiftAmount(node, 31, s);
10764+ normalizeShiftAmount(node, 31, s);
1084110765 return node;
1084210766 }
1084310767
@@ -10861,13 +10785,7 @@ TR::Node *lrolSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
1086110785 return s->replaceNode(node, firstChild, s->_curTree);
1086210786 }
1086310787
10864- // Replace rotate of constant zero with constant zero
10865- if (firstChild->getOpCode().isLoadConst() && firstChild->getLongInt() == 0)
10866- {
10867- return s->replaceNode(node, firstChild, s->_curTree);
10868- }
10869- else
10870- normalizeShiftAmount(node, 63, s);
10788+ normalizeShiftAmount(node, 63, s);
1087110789 return node;
1087210790 }
1087310791
0 commit comments