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

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

Issue 2795803003: s390: exploit new mul in TF (Closed)
Patch Set: rebase 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 | « src/compiler/s390/code-generator-s390.cc ('k') | src/s390/constants-s390.h » ('j') | 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 802c499ee595d76441832223bc55961e8849248f..e1195f73d7dde417b5d80259a5763008784e6c9b 100644
--- a/src/compiler/s390/instruction-selector-s390.cc
+++ b/src/compiler/s390/instruction-selector-s390.cc
@@ -1359,10 +1359,16 @@ static inline bool TryMatchInt32SubWithOverflow(InstructionSelector* selector,
static inline bool TryMatchInt32MulWithOverflow(InstructionSelector* selector,
Node* node) {
if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
- FlagsContinuation cont = FlagsContinuation::ForSet(kNotEqual, ovf);
- VisitWord32BinOp(selector, node, kS390_Mul32WithOverflow,
- OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps,
- &cont);
+ if (CpuFeatures::IsSupported(MISC_INSTR_EXT2)) {
+ DCHECK(TryMatchInt32OpWithOverflow<kS390_Mul32>(
+ selector, node,
+ OperandMode::kAllowRRR | OperandMode::kAllowRM) == true);
+ } else {
+ FlagsContinuation cont = FlagsContinuation::ForSet(kNotEqual, ovf);
+ VisitWord32BinOp(selector, node, kS390_Mul32WithOverflow,
+ OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps,
+ &cont);
+ }
return true;
}
return TryMatchShiftFromMul<Int32BinopMatcher, kS390_ShiftLeft32>(selector,
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/s390/constants-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698