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

Unified Diff: src/compiler/opcodes.cc

Issue 1433353006: [machine-operator-reducer] fix float truncation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm64: do not merge 64bit shr/sar with 32bit op Created 5 years, 1 month 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/compiler/opcodes.cc
diff --git a/src/compiler/opcodes.cc b/src/compiler/opcodes.cc
index 2a8e01a26d90e9bfbe4460f015358e13eb2f8be8..cbb39daafd098ae1656dac2a4f7c58181dae3f01 100644
--- a/src/compiler/opcodes.cc
+++ b/src/compiler/opcodes.cc
@@ -35,6 +35,39 @@ std::ostream& operator<<(std::ostream& os, IrOpcode::Value opcode) {
return os << IrOpcode::Mnemonic(opcode);
}
+
+// static
+bool IrOpcode::Is64(Value value) {
titzer 2015/11/13 23:35:17 What are the semantics of this predicate? It's not
fedor.indutny 2015/11/14 00:15:52 This method returns true if the opcode output is a
+ switch (value) {
+ case kInt64Constant:
+ case kFloat64Constant:
+ case kChangeTaggedToFloat64:
+ case kWord64Equal:
+ case kInt64LessThan:
+ case kInt64LessThanOrEqual:
+ case kUint64LessThan:
+ case kUint64LessThanOrEqual:
+ case kFloat64Equal:
+ case kFloat64LessThan:
+ case kFloat64LessThanOrEqual:
+ case kChangeFloat32ToFloat64:
+ case kChangeInt32ToFloat64:
+ case kChangeInt32ToInt64:
+ case kChangeUint32ToFloat64:
+ case kChangeUint32ToUint64:
+ case kRoundInt64ToFloat64:
+ case kRoundUint64ToFloat64:
+ case kBitcastFloat64ToInt64:
+ case kBitcastInt64ToFloat64:
+ return true;
+
+ default:
+ return (value >= kWord64Popcnt && value <= kWord64Ctz) ||
+ (value >= kInt64Add && value <= kUint64Mod) ||
+ (value >= kFloat64Add && value <= kFloat64InsertHighWord32);
+ }
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698