Index: test/unittests/compiler/mips/instruction-selector-mips-unittest.cc |
diff --git a/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc b/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc |
index 3f45a446150571f67eb5ca6a4da3051a12c33944..7f08b5d12b17dce8a9360495219a6adb361d796c 100644 |
--- a/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc |
+++ b/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc |
@@ -362,6 +362,28 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorLogicalTest, |
::testing::ValuesIn(kLogicalInstructions)); |
+TEST_F(InstructionSelectorTest, Word32XorMinusOneWithParameter) { |
+ { |
+ StreamBuilder m(this, kMachInt32, kMachInt32); |
+ m.Return(m.Word32Xor(m.Parameter(0), m.Int32Constant(-1))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kMipsNor, s[0]->arch_opcode()); |
+ EXPECT_EQ(2U, s[0]->InputCount()); |
+ EXPECT_EQ(1U, s[0]->OutputCount()); |
+ } |
+ { |
+ StreamBuilder m(this, kMachInt32, kMachInt32); |
+ m.Return(m.Word32Xor(m.Int32Constant(-1), m.Parameter(0))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kMipsNor, s[0]->arch_opcode()); |
+ EXPECT_EQ(2U, s[0]->InputCount()); |
+ EXPECT_EQ(1U, s[0]->OutputCount()); |
+ } |
+} |
+ |
+ |
TEST_F(InstructionSelectorTest, Word32XorMinusOneWithWord32Or) { |
{ |
StreamBuilder m(this, kMachInt32, kMachInt32); |