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

Unified Diff: test/unittests/compiler/change-lowering-unittest.cc

Issue 714413004: [turbofan] More useful typing for And, Or and Shr. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix the range/bitset subtyping mess-up in bitwise or. Created 6 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 | « test/cctest/compiler/test-changes-lowering.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/change-lowering-unittest.cc
diff --git a/test/unittests/compiler/change-lowering-unittest.cc b/test/unittests/compiler/change-lowering-unittest.cc
index 7f5ec8f94b8e3394f48d77e283b96f7f7cef297f..c6b069536448b152fdd20f0d8e3688c650465110 100644
--- a/test/unittests/compiler/change-lowering-unittest.cc
+++ b/test/unittests/compiler/change-lowering-unittest.cc
@@ -188,6 +188,7 @@ class ChangeLowering32Test : public ChangeLoweringTest {
TARGET_TEST_F(ChangeLowering32Test, ChangeInt32ToTagged) {
Node* val = Parameter(0);
Node* node = graph()->NewNode(simplified()->ChangeInt32ToTagged(), val);
+ NodeProperties::SetBounds(val, Bounds(Type::None(), Type::Signed32()));
Reduction reduction = Reduce(node);
ASSERT_TRUE(reduction.Changed());
@@ -212,6 +213,19 @@ TARGET_TEST_F(ChangeLowering32Test, ChangeInt32ToTagged) {
}
+TARGET_TEST_F(ChangeLowering32Test, ChangeInt32ToTaggedSmall) {
+ Node* val = Parameter(0);
+ Node* node = graph()->NewNode(simplified()->ChangeInt32ToTagged(), val);
+ NodeProperties::SetBounds(val, Bounds(Type::None(), Type::SignedSmall()));
+ Reduction reduction = Reduce(node);
+ ASSERT_TRUE(reduction.Changed());
+
+ Node* change = reduction.replacement();
+ Capture<Node*> add, branch, heap_number, if_true;
+ EXPECT_THAT(change, IsWord32Shl(val, IsInt32Constant(SmiShiftAmount())));
+}
+
+
TARGET_TEST_F(ChangeLowering32Test, ChangeTaggedToFloat64) {
STATIC_ASSERT(kSmiTag == 0);
STATIC_ASSERT(kSmiTagSize == 1);
« no previous file with comments | « test/cctest/compiler/test-changes-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698