diff options
| author | Cong Hou <congh@google.com> | 2015-09-18 18:19:40 +0000 |
|---|---|---|
| committer | Cong Hou <congh@google.com> | 2015-09-18 18:19:40 +0000 |
| commit | f9f9ffb98becba3bf72ab121b5f89f4c250b029d (patch) | |
| tree | a662c296d49e983dcca191e117957b592a525018 /llvm/test/CodeGen/Thumb2 | |
| parent | 2b38f33b82d9d0dd9dc566edb532f71c2406886c (diff) | |
| download | bcm5719-llvm-f9f9ffb98becba3bf72ab121b5f89f4c250b029d.tar.gz bcm5719-llvm-f9f9ffb98becba3bf72ab121b5f89f4c250b029d.zip | |
Scaling up values in ARMBaseInstrInfo::isProfitableToIfCvt() before they are scaled by a probability to avoid precision issue.
In ARMBaseInstrInfo::isProfitableToIfCvt(), there is a simple cost model in which the number of cycles is scaled by a probability to estimate the cost. However, when the number of cycles is small (which is usually the case), there is a precision issue after the computation. To avoid this issue, this patch scales those cycles by 1024 (chosen to make the multiplication a litter faster) before they are scaled by the probability. Other variables are also scaled up for the final comparison.
Differential Revision: http://reviews.llvm.org/D12742
llvm-svn: 248018
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
| -rw-r--r-- | llvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll b/llvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll index da1057b8bb4..09def7372f5 100644 --- a/llvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll +++ b/llvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll @@ -24,11 +24,10 @@ cond_next: define i32 @t2(i32 %a, i32 %b) nounwind { entry: -; Do not if-convert when branches go to the different loops. ; CHECK-LABEL: t2: -; CHECK-NOT: ite gt -; CHECK-NOT: subgt -; CHECK-NOT: suble +; CHECK: ite gt +; CHECK: subgt +; CHECK: suble %tmp1434 = icmp eq i32 %a, %b ; <i1> [#uses=1] br i1 %tmp1434, label %bb17, label %bb.outer |

