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

Unified Diff: test/cctest/compiler/test-representation-change.cc

Issue 1455103002: [turbofan] Only infer signedness for Float64->Word32 representation change from the input type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/compiler/representation-change.h ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-representation-change.cc
diff --git a/test/cctest/compiler/test-representation-change.cc b/test/cctest/compiler/test-representation-change.cc
index 616c3736e174ebb0a02159fd9213110c1363b7d7..5fad145da9a6d7147db0117dd2fc13e2142a68a9 100644
--- a/test/cctest/compiler/test-representation-change.cc
+++ b/test/cctest/compiler/test-representation-change.cc
@@ -81,7 +81,9 @@ class RepresentationChangerTester : public HandleAndZoneScope,
}
Node* Parameter(int index = 0) {
- return graph()->NewNode(common()->Parameter(index), graph()->start());
+ Node* n = graph()->NewNode(common()->Parameter(index), graph()->start());
+ NodeProperties::SetType(n, Type::Any());
+ return n;
}
void CheckTypeError(MachineTypeUnion from, MachineTypeUnion to) {
@@ -451,17 +453,19 @@ TEST(SignednessInWord32) {
RepresentationChangerTester r;
// TODO(titzer): assume that uses of a word32 without a sign mean kTypeInt32.
- CheckChange(IrOpcode::kChangeTaggedToInt32, kRepTagged,
+ CheckChange(IrOpcode::kChangeTaggedToInt32, kRepTagged | kTypeInt32,
kRepWord32 | kTypeInt32);
- CheckChange(IrOpcode::kChangeTaggedToUint32, kRepTagged,
+ CheckChange(IrOpcode::kChangeTaggedToUint32, kRepTagged | kTypeUint32,
kRepWord32 | kTypeUint32);
CheckChange(IrOpcode::kChangeInt32ToFloat64, kRepWord32, kRepFloat64);
- CheckChange(IrOpcode::kChangeFloat64ToInt32, kRepFloat64, kRepWord32);
+ CheckChange(IrOpcode::kChangeFloat64ToInt32, kRepFloat64 | kTypeInt32,
+ kRepWord32);
+ CheckChange(IrOpcode::kTruncateFloat64ToInt32, kRepFloat64, kRepWord32);
CheckTwoChanges(IrOpcode::kChangeInt32ToFloat64,
IrOpcode::kTruncateFloat64ToFloat32, kRepWord32, kRepFloat32);
CheckTwoChanges(IrOpcode::kChangeFloat32ToFloat64,
- IrOpcode::kChangeFloat64ToInt32, kRepFloat32, kRepWord32);
+ IrOpcode::kTruncateFloat64ToInt32, kRepFloat32, kRepWord32);
}
« no previous file with comments | « src/compiler/representation-change.h ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698