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

Unified Diff: src/compiler/s390/instruction-selector-s390.cc

Issue 2815903002: s390: add new mul support on branches and deopts (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/s390/instruction-selector-s390.cc
diff --git a/src/compiler/s390/instruction-selector-s390.cc b/src/compiler/s390/instruction-selector-s390.cc
index 228ec3c0d54c83e35687ec5d0c6103569dd8d572..3ff3f2354cc6af0494a624933b31d5b00d01ddc9 100644
--- a/src/compiler/s390/instruction-selector-s390.cc
+++ b/src/compiler/s390/instruction-selector-s390.cc
@@ -2050,11 +2050,18 @@ void VisitWordCompareZero(InstructionSelector* selector, Node* user,
return VisitWord32BinOp(selector, node, kS390_Sub32,
SubOperandMode, cont);
case IrOpcode::kInt32MulWithOverflow:
- cont->OverwriteAndNegateIfEqual(kNotEqual);
- return VisitWord32BinOp(
- selector, node, kS390_Mul32WithOverflow,
- OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps,
- cont);
+ if (CpuFeatures::IsSupported(MISC_INSTR_EXT2)) {
+ cont->OverwriteAndNegateIfEqual(kOverflow);
+ return VisitWord32BinOp(
+ selector, node, kS390_Mul32,
+ OperandMode::kAllowRRR | OperandMode::kAllowRM, cont);
+ } else {
+ cont->OverwriteAndNegateIfEqual(kNotEqual);
+ return VisitWord32BinOp(
+ selector, node, kS390_Mul32WithOverflow,
+ OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps,
+ cont);
+ }
case IrOpcode::kInt32AbsWithOverflow:
cont->OverwriteAndNegateIfEqual(kOverflow);
return VisitWord32UnaryOp(selector, node, kS390_Abs32,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698