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

Unified Diff: src/IceCfgNode.cpp

Issue 1847423003: Replace constant conditional branches by unconditional branches (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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/IceInst.h » ('j') | src/IceInst.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index a87642d14c78a72370a6cd4393dfd8c3bc3141a0..f49a2171ae6e0472d1d67dd270ec16d863645f31 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -106,8 +106,11 @@ void CfgNode::validatePhis() {
break;
}
}
- if (!Found)
- llvm::report_fatal_error("Phi error: label for bad incoming edge");
+ if (!Found) {
+ // Predecessor was unreachable, so if (impossibly) the control flow
+ // enters from that predecessor, the value should be zero.
+ Phi->clearOperandForTarget(Label);
+ }
}
for (CfgNode *InNode : getInEdges()) {
bool Found = false;
« no previous file with comments | « no previous file | src/IceInst.h » ('j') | src/IceInst.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698