summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorSerguei Katkov <serguei.i.katkov@intel.com>2015-07-15 15:32:09 +0600
committerNicolas Geoffray <ngeoffray@google.com>2015-07-16 15:58:38 +0100
commit22552df9c27516b60836f49f1a17737e70889110 (patch)
tree4977a2eeaa13aff7fe81652d1a277729916b061c /compiler
parent22ee090292e9f2ab0326600a467294ecb8b0e2ad (diff)
downloadart-22552df9c27516b60836f49f1a17737e70889110.zip
art-22552df9c27516b60836f49f1a17737e70889110.tar.gz
art-22552df9c27516b60836f49f1a17737e70889110.tar.bz2
ART: Boolean simplifier fix
Boolean simplifier should not remove condition instruction if it has side effects. (cherry picked from commit 108ceb48edea654c544b483c302212e43d79a472) Change-Id: I00dd595da1bba0f027f5c8647035e9fd8ba62ee1
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/boolean_simplifier.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc
index daf7d67..bbbdd3a 100644
--- a/compiler/optimizing/boolean_simplifier.cc
+++ b/compiler/optimizing/boolean_simplifier.cc
@@ -146,11 +146,6 @@ void HBooleanSimplifier::TryRemovingBooleanSelection(HBasicBlock* block) {
// entry block. Any following blocks would have had the join block
// as a dominator, and `MergeWith` handles changing that to the
// entry block.
-
- // Remove the original condition if it is now unused.
- if (!if_condition->HasUses()) {
- if_condition->GetBlock()->RemoveInstructionOrPhi(if_condition);
- }
}
void HBooleanSimplifier::Run() {