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

Unified Diff: src/compiler/instruction-selector-impl.h

Issue 1356283003: [arm64] Optimize fcmp when lhs operand is #0.0 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/instruction-codes.h ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector-impl.h
diff --git a/src/compiler/instruction-selector-impl.h b/src/compiler/instruction-selector-impl.h
index e22f5458697b852f59300dc5e4011298673da45e..88283d489877caeef91ed8e431c82e19a007d9fa 100644
--- a/src/compiler/instruction-selector-impl.h
+++ b/src/compiler/instruction-selector-impl.h
@@ -291,41 +291,7 @@ class FlagsContinuation final {
void Commute() {
DCHECK(!IsNone());
- switch (condition_) {
- case kEqual:
- case kNotEqual:
- case kOverflow:
- case kNotOverflow:
- return;
- case kSignedLessThan:
- condition_ = kSignedGreaterThan;
- return;
- case kSignedGreaterThanOrEqual:
- condition_ = kSignedLessThanOrEqual;
- return;
- case kSignedLessThanOrEqual:
- condition_ = kSignedGreaterThanOrEqual;
- return;
- case kSignedGreaterThan:
- condition_ = kSignedLessThan;
- return;
- case kUnsignedLessThan:
- condition_ = kUnsignedGreaterThan;
- return;
- case kUnsignedGreaterThanOrEqual:
- condition_ = kUnsignedLessThanOrEqual;
- return;
- case kUnsignedLessThanOrEqual:
- condition_ = kUnsignedGreaterThanOrEqual;
- return;
- case kUnsignedGreaterThan:
- condition_ = kUnsignedLessThan;
- return;
- case kUnorderedEqual:
- case kUnorderedNotEqual:
- return;
- }
- UNREACHABLE();
+ condition_ = CommuteFlagsCondition(condition_);
}
void OverwriteAndNegateIfEqual(FlagsCondition condition) {
« no previous file with comments | « src/compiler/instruction-codes.h ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698