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, |