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

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

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.cc
diff --git a/test/unittests/compiler/instruction-selector-unittest.cc b/test/unittests/compiler/instruction-selector-unittest.cc
index 58946e96d056619e31d5e4bc86ce5a22204bba04..01aa80af7793771d0d0e13f0fd7fa53d0b2c8538 100644
--- a/test/unittests/compiler/instruction-selector-unittest.cc
+++ b/test/unittests/compiler/instruction-selector-unittest.cc
@@ -84,9 +84,12 @@ InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build(
InstructionOperand* input = instr->InputAt(i);
EXPECT_NE(InstructionOperand::CONSTANT, input->kind());
if (input->IsImmediate()) {
- int index = ImmediateOperand::cast(input)->index();
- s.immediates_.insert(
- std::make_pair(index, sequence.GetImmediate(index)));
+ auto imm = ImmediateOperand::cast(input);
+ if (imm->type() == ImmediateOperand::INDEXED) {
+ int index = imm->indexed_value();
+ s.immediates_.insert(
+ std::make_pair(index, sequence.GetImmediate(imm)));
+ }
}
}
s.instructions_.push_back(instr);
« no previous file with comments | « test/unittests/compiler/instruction-selector-unittest.h ('k') | test/unittests/compiler/instruction-sequence-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698