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

Unified Diff: src/IceInst.cpp

Issue 1215443002: Fixes bug on conditional branch where the targets are the same. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up test. Created 5 years, 6 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 | tests_lit/llvm2ice_tests/cond-br-same-target.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index e6857549a9fd7c548dcb0a35d72b291252e0c3dc..317232a12256764acd78ca4ad82448077020dded 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -270,10 +270,10 @@ InstAssign::InstAssign(Cfg *Func, Variable *Dest, Operand *Source)
// If TargetTrue==TargetFalse, we turn it into an unconditional
// branch. This ensures that, along with the 'switch' instruction
// semantics, there is at most one edge from one node to another.
-InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue,
- CfgNode *TargetFalse)
- : InstHighLevel(Func, Inst::Br, 1, nullptr), TargetFalse(TargetFalse),
- TargetTrue(TargetTrue) {
+InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue_,
+ CfgNode *TargetFalse_)
+ : InstHighLevel(Func, Inst::Br, 1, nullptr), TargetFalse(TargetFalse_),
+ TargetTrue(TargetTrue_) {
if (TargetTrue == TargetFalse) {
TargetTrue = nullptr; // turn into unconditional version
} else {
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/cond-br-same-target.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698