diff options
author | 2017-03-30 16:00:41 +0100 | |
---|---|---|
committer | 2017-05-08 20:19:48 +0100 | |
commit | b404f349d69f940ef2974915fe97c16070364efd (patch) | |
tree | 2d75a4452ab569c6aacad636fbf546faf3593d1c /compiler/optimizing/intrinsics_arm.cc | |
parent | 6b90142986f76436503bcdca37ace6537ba8f0d4 (diff) |
ARM: Improve the code generated for HCondition with a constant input
Test: m test-art-target-run-test-409-materialized-condition
Test: m test-art-target-run-test-570-checker-select
Change-Id: Ie3418fbac1d2ecb4d7fc847d4722758e1e01bc2e
Diffstat (limited to 'compiler/optimizing/intrinsics_arm.cc')
-rw-r--r-- | compiler/optimizing/intrinsics_arm.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/compiler/optimizing/intrinsics_arm.cc b/compiler/optimizing/intrinsics_arm.cc index 750f9cc213..7769b147a3 100644 --- a/compiler/optimizing/intrinsics_arm.cc +++ b/compiler/optimizing/intrinsics_arm.cc @@ -2599,11 +2599,7 @@ 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)); - // 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); + codegen_->GenerateConditionWithZero(kCondEQ, out, out); } void IntrinsicLocationsBuilderARM::VisitDoubleIsInfinite(HInvoke* invoke) { @@ -2626,11 +2622,7 @@ 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)); - // 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); + codegen_->GenerateConditionWithZero(kCondEQ, out, out); } void IntrinsicLocationsBuilderARM::VisitReferenceGetReferent(HInvoke* invoke) { |