@@ -10259,12 +10259,7 @@ TR::Node *ishlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10259
10259
if (identity)
10260
10260
return identity;
10261
10261
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() &&
10268
10263
performTransformation(s->comp(), "%sChanged ishl by const into imul by const in node [%s]\n", s->optDetailString(), node->getName(s->getDebug())))
10269
10264
{
10270
10265
// 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)
10306
10301
if (identity)
10307
10302
return identity;
10308
10303
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())
10315
10305
{
10316
10306
// Canonicalize shift by a constant into multiply by a constant
10317
10307
//
@@ -10355,12 +10345,6 @@ TR::Node *bshlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10355
10345
if (identity)
10356
10346
return identity;
10357
10347
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
-
10364
10348
return node;
10365
10349
}
10366
10350
@@ -10381,12 +10365,6 @@ TR::Node *sshlSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10381
10365
if (identity)
10382
10366
return identity;
10383
10367
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
-
10390
10368
return node;
10391
10369
}
10392
10370
@@ -10413,13 +10391,7 @@ TR::Node *ishrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10413
10391
if (identity)
10414
10392
return identity;
10415
10393
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);
10423
10395
10424
10396
return node;
10425
10397
}
@@ -10443,13 +10415,7 @@ TR::Node *lshrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10443
10415
if (identity)
10444
10416
return identity;
10445
10417
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);
10453
10419
10454
10420
return node;
10455
10421
}
@@ -10471,12 +10437,6 @@ TR::Node *bshrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10471
10437
if (identity)
10472
10438
return identity;
10473
10439
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
-
10480
10440
return node;
10481
10441
}
10482
10442
@@ -10497,12 +10457,6 @@ TR::Node *sshrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10497
10457
if (identity)
10498
10458
return identity;
10499
10459
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
-
10506
10460
return node;
10507
10461
}
10508
10462
@@ -10595,13 +10549,7 @@ TR::Node *iushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
10595
10549
}
10596
10550
}
10597
10551
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);
10605
10553
10606
10554
return node;
10607
10555
}
@@ -10743,13 +10691,7 @@ TR::Node *lushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
10743
10691
}
10744
10692
}
10745
10693
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);
10753
10695
10754
10696
return node;
10755
10697
}
@@ -10771,12 +10713,6 @@ TR::Node *bushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
10771
10713
if (identity)
10772
10714
return identity;
10773
10715
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
-
10780
10716
return node;
10781
10717
}
10782
10718
@@ -10797,12 +10733,6 @@ TR::Node *sushrSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s
10797
10733
if (identity)
10798
10734
return identity;
10799
10735
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
-
10806
10736
return node;
10807
10737
}
10808
10738
@@ -10831,13 +10761,7 @@ TR::Node *irolSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10831
10761
return s->replaceNode(node, firstChild, s->_curTree);
10832
10762
}
10833
10763
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);
10841
10765
return node;
10842
10766
}
10843
10767
@@ -10861,13 +10785,7 @@ TR::Node *lrolSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
10861
10785
return s->replaceNode(node, firstChild, s->_curTree);
10862
10786
}
10863
10787
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);
10871
10789
return node;
10872
10790
}
10873
10791
0 commit comments