ART: Fix removing a Phi with RemoveInstruction
Boolean simplifier might attempt to remove a Phi from the Instruction
list.
Change-Id: I698cc616549bd88dac96395cb2e5d09b5433d157
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc
index 30c89f2..9a92151 100644
--- a/compiler/optimizing/boolean_simplifier.cc
+++ b/compiler/optimizing/boolean_simplifier.cc
@@ -128,7 +128,7 @@
// Remove the original condition if it is now unused.
if (!if_condition->HasUses()) {
- if_condition->GetBlock()->RemoveInstruction(if_condition);
+ if_condition->GetBlock()->RemoveInstructionOrPhi(if_condition);
}
}
}