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

Unified Diff: src/compiler/register-allocator-verifier.cc

Issue 860363002: [turbofan] Fix register allocator verifier to allow 1-input phis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator-verifier.cc
diff --git a/src/compiler/register-allocator-verifier.cc b/src/compiler/register-allocator-verifier.cc
index dabfd59ef61d4d0c0e1a60500acbd0e9a54ef12e..df97157d329d4a9586834a26bc1ba6f93a29db3f 100644
--- a/src/compiler/register-allocator-verifier.cc
+++ b/src/compiler/register-allocator-verifier.cc
@@ -242,9 +242,10 @@ class RegisterAllocatorVerifier::OutgoingMapping : public ZoneObject {
const InstructionBlock* block, size_t phi_index) {
// This operation is only valid in edge split form.
size_t predecessor_index = block->predecessors()[phi_index].ToSize();
- CHECK(sequence->instruction_blocks()[predecessor_index]->SuccessorCount() ==
- 1);
for (const auto* phi : block->phis()) {
+ CHECK(
+ sequence->instruction_blocks()[predecessor_index]->SuccessorCount() ==
+ 1);
auto input = phi->inputs()[phi_index];
CHECK(locations()->find(input) != locations()->end());
auto it = locations()->find(phi->output());
@@ -317,7 +318,7 @@ class RegisterAllocatorVerifier::OutgoingMapping : public ZoneObject {
size_t predecessor_index = block->predecessors()[0].ToSize();
CHECK(predecessor_index < block->rpo_number().ToSize());
auto* incoming = outgoing_mappings->at(predecessor_index);
- if (block->PredecessorCount() > 1) {
+ if (block->PredecessorCount() >= 1) {
// Update incoming map with phis. The remaining phis will be checked later
// as their mappings are not guaranteed to exist yet.
incoming->RunPhis(sequence, block, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698