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

Unified Diff: src/compiler/value-numbering-reducer.cc

Issue 539833003: [turbofan] Value numbering should never replace a node with itself. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | src/compiler/value-numbering-reducer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/value-numbering-reducer.cc
diff --git a/src/compiler/value-numbering-reducer.cc b/src/compiler/value-numbering-reducer.cc
index 4fe4b39c389ffa69bcec22f196730b1b862630bb..bdc9a520174a0c3d89d8123ec819fe8c5580c4d2 100644
--- a/src/compiler/value-numbering-reducer.cc
+++ b/src/compiler/value-numbering-reducer.cc
@@ -60,6 +60,7 @@ Reduction ValueNumberingReducer::Reduce(Node* node) {
Entry** head = &buckets_[HashCode(node) % arraysize(buckets_)];
for (Entry* entry = *head; entry; entry = entry->next()) {
if (entry->node()->op() == NULL) continue;
+ if (entry->node() == node) return NoChange();
if (Equals(node, entry->node())) {
return Replace(entry->node());
}
« no previous file with comments | « no previous file | src/compiler/value-numbering-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698