diff options
author | 2017-05-10 11:59:26 +0000 | |
---|---|---|
committer | 2017-05-10 11:59:26 +0000 | |
commit | 3082661d260449e1d773f077e914160c7ad58de5 (patch) | |
tree | 4407aec4c23d0fa52b9a3334529042797da2d24f /compiler/optimizing/intrinsics_arm.cc | |
parent | b404f349d69f940ef2974915fe97c16070364efd (diff) |
Revert "ARM: Improve the code generated for HCondition with a constant input"
Reverting to see if that change is responsible for a crash. Will share with ARM if it is.
This reverts commit b404f349d69f940ef2974915fe97c16070364efd.
Change-Id: Idd04f9109447319445ff49f3fd7dc5b069b4883f
Diffstat (limited to 'compiler/optimizing/intrinsics_arm.cc')
-rw-r--r-- | compiler/optimizing/intrinsics_arm.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/optimizing/intrinsics_arm.cc b/compiler/optimizing/intrinsics_arm.cc index 7769b147a3..750f9cc213 100644 --- a/compiler/optimizing/intrinsics_arm.cc +++ b/compiler/optimizing/intrinsics_arm.cc @@ -2599,7 +2599,11 @@ void IntrinsicCodeGeneratorARM::VisitFloatIsInfinite(HInvoke* invoke) { // We don't care about the sign bit, so shift left. __ Lsl(out, out, 1); __ eor(out, out, ShifterOperand(infinity)); - codegen_->GenerateConditionWithZero(kCondEQ, out, out); + // If the result is 0, then it has 32 leading zeros, and less than that otherwise. + __ clz(out, out); + // Any number less than 32 logically shifted right by 5 bits results in 0; + // the same operation on 32 yields 1. + __ Lsr(out, out, 5); } void IntrinsicLocationsBuilderARM::VisitDoubleIsInfinite(HInvoke* invoke) { @@ -2622,7 +2626,11 @@ void IntrinsicCodeGeneratorARM::VisitDoubleIsInfinite(HInvoke* invoke) { __ eor(out, out, ShifterOperand(infinity_high2)); // We don't care about the sign bit, so shift left. __ orr(out, IP, ShifterOperand(out, LSL, 1)); - codegen_->GenerateConditionWithZero(kCondEQ, out, out); + // If the result is 0, then it has 32 leading zeros, and less than that otherwise. + __ clz(out, out); + // Any number less than 32 logically shifted right by 5 bits results in 0; + // the same operation on 32 yields 1. + __ Lsr(out, out, 5); } void IntrinsicLocationsBuilderARM::VisitReferenceGetReferent(HInvoke* invoke) { |