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

Unified Diff: test/unittests/compiler/instruction-selector-unittest.h

Issue 1075903002: [turbofan] support small immediates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months 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: test/unittests/compiler/instruction-selector-unittest.h
diff --git a/test/unittests/compiler/instruction-selector-unittest.h b/test/unittests/compiler/instruction-selector-unittest.h
index 2be283fd691f940a571e594e4903e68a7e88022a..239968ab20647d7d9359d39eceb17b691312e0d3 100644
--- a/test/unittests/compiler/instruction-selector-unittest.h
+++ b/test/unittests/compiler/instruction-selector-unittest.h
@@ -209,8 +209,12 @@ class InstructionSelectorTest : public TestWithContext,
EXPECT_FALSE(constants_.end() == i);
} else {
EXPECT_EQ(InstructionOperand::IMMEDIATE, operand->kind());
- i = immediates_.find(ImmediateOperand::cast(operand)->index());
- EXPECT_EQ(ImmediateOperand::cast(operand)->index(), i->first);
+ auto imm = ImmediateOperand::cast(operand);
+ if (imm->type() == ImmediateOperand::INLINE) {
+ return Constant(imm->inline_value());
+ }
+ i = immediates_.find(imm->indexed_value());
+ EXPECT_EQ(imm->indexed_value(), i->first);
EXPECT_FALSE(immediates_.end() == i);
}
return i->second;
« no previous file with comments | « test/cctest/compiler/test-jump-threading.cc ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698