Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1062)

Unified Diff: src/crankshaft/s390/lithium-s390.cc

Issue 2561673002: s390: Remove RSubI on s390 and optimize ConstantI (Closed)
Patch Set: remove function Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/crankshaft/s390/lithium-s390.cc
diff --git a/src/crankshaft/s390/lithium-s390.cc b/src/crankshaft/s390/lithium-s390.cc
index 3d1476403295ffe6d6c06d7f30e910cf81192aea..e147cebeffef193e0f29e50f331da5ecc602c74d 100644
--- a/src/crankshaft/s390/lithium-s390.cc
+++ b/src/crankshaft/s390/lithium-s390.cc
@@ -1353,12 +1353,6 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) {
DCHECK(instr->left()->representation().Equals(instr->representation()));
DCHECK(instr->right()->representation().Equals(instr->representation()));
- if (instr->left()->IsConstant() &&
- !instr->CheckFlag(HValue::kCanOverflow)) {
- // If lhs is constant, do reverse subtraction instead.
- return DoRSub(instr);
- }
-
LOperand* left = UseRegisterAtStart(instr->left());
LOperand* right = UseOrConstantAtStart(instr->right());
LSubI* sub = new (zone()) LSubI(left, right);
@@ -1374,21 +1368,6 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) {
}
}
-LInstruction* LChunkBuilder::DoRSub(HSub* instr) {
- DCHECK(instr->representation().IsSmiOrInteger32());
- DCHECK(instr->left()->representation().Equals(instr->representation()));
- DCHECK(instr->right()->representation().Equals(instr->representation()));
- DCHECK(!instr->CheckFlag(HValue::kCanOverflow));
-
- // Note: The lhs of the subtraction becomes the rhs of the
- // reverse-subtraction.
- LOperand* left = UseRegisterAtStart(instr->right());
- LOperand* right = UseOrConstantAtStart(instr->left());
- LRSubI* rsb = new (zone()) LRSubI(left, right);
- LInstruction* result = DefineAsRegister(rsb);
- return result;
-}
-
LInstruction* LChunkBuilder::DoMultiplyAdd(HMul* mul, HValue* addend) {
LOperand* multiplier_op = UseRegister(mul->left());
LOperand* multiplicand_op = UseRegister(mul->right());

Powered by Google App Engine
This is Rietveld 408576698