diff options
author | 2015-03-30 17:22:24 -0700 | |
---|---|---|
committer | 2015-03-30 17:22:24 -0700 | |
commit | cbaf4961a34e603239b4b9e597f999546bbaa5e9 (patch) | |
tree | 63c6f3f97254bdc6b3eab7fca512535c810dcfd3 /compiler/optimizing/boolean_simplifier.cc | |
parent | 392351a8aa9c6aec288050ef3f1f5471305b27c1 (diff) |
ART: Don't fail on unsupported conditions in boolean simplifier
Skip simplification instead of FATALing when an unsupported condition
is found.
Bug: 19992954
Change-Id: Ie2845bead72da63018734e6dd91ce65824658b39
Diffstat (limited to 'compiler/optimizing/boolean_simplifier.cc')
-rw-r--r-- | compiler/optimizing/boolean_simplifier.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc index e9ca042f1d..ab77505b6f 100644 --- a/compiler/optimizing/boolean_simplifier.cc +++ b/compiler/optimizing/boolean_simplifier.cc @@ -72,8 +72,8 @@ static HInstruction* GetOppositeCondition(HInstruction* cond) { } } - LOG(FATAL) << "Instruction " << cond->DebugName() << " used as a condition"; - UNREACHABLE(); + // TODO: b/19992954 + return nullptr; } void HBooleanSimplifier::Run() { @@ -105,6 +105,10 @@ void HBooleanSimplifier::Run() { HInstruction* replacement; if (NegatesCondition(true_value, false_value)) { replacement = GetOppositeCondition(if_condition); + if (replacement == nullptr) { + // Something we could not handle. + continue; + } if (replacement->GetBlock() == nullptr) { block->InsertInstructionBefore(replacement, if_instruction); } |