Index: test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc |
diff --git a/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc b/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc |
index afa1e942455f502528fcbc4991162842a0502d10..a93b3fcafa21ae15fc7a666f71ef5174693703e6 100644 |
--- a/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc |
+++ b/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc |
@@ -666,6 +666,29 @@ TEST_F(InstructionSelectorTest, Float64BinopArithmetic) { |
} |
} |
+ |
+// ----------------------------------------------------------------------------- |
+// Miscellaneous. |
+ |
+ |
+TEST_F(InstructionSelectorTest, Uint32LessThanWithLoadAndLoadStackPointer) { |
+ StreamBuilder m(this, kMachBool); |
+ Node* const sl = m.Load( |
+ kMachPtr, |
+ m.ExternalConstant(ExternalReference::address_of_stack_limit(isolate()))); |
+ Node* const sp = m.LoadStackPointer(); |
+ Node* const n = m.Uint32LessThan(sl, sp); |
+ m.Return(n); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kIA32StackCheck, s[0]->arch_opcode()); |
+ ASSERT_EQ(0U, s[0]->InputCount()); |
+ ASSERT_EQ(1U, s[0]->OutputCount()); |
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
+ EXPECT_EQ(kFlags_set, s[0]->flags_mode()); |
+ EXPECT_EQ(kUnsignedGreaterThan, s[0]->flags_condition()); |
+} |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |