diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-04-16 13:33:36 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-04-16 13:33:36 +0000 |
commit | e773e8c3e53aadb6e861316e4db88d63a0226b2f (patch) | |
tree | fabf835486b538a63eaa46f8f387d2e0b0b1b1e5 /test | |
parent | 656dc6260654a7fa29d223bcaf6aae048669c72d (diff) | |
download | external_llvm-e773e8c3e53aadb6e861316e4db88d63a0226b2f.zip external_llvm-e773e8c3e53aadb6e861316e4db88d63a0226b2f.tar.gz external_llvm-e773e8c3e53aadb6e861316e4db88d63a0226b2f.tar.bz2 |
Add a somewhat hacky heuristic to do something different from whole-loop
rotation. When there is a loop backedge which is an unconditional
branch, we will end up with a branch somewhere no matter what. Try
placing this backedge in a fallthrough position above the loop header as
that will definitely remove at least one branch from the loop iteration,
where whole loop rotation may not.
I haven't seen any benchmarks where this is important but loop-blocks.ll
tests for it, and so this will be covered when I flip the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/block-placement.ll | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/CodeGen/X86/block-placement.ll b/test/CodeGen/X86/block-placement.ll index 9359fb8..608e1ea 100644 --- a/test/CodeGen/X86/block-placement.ll +++ b/test/CodeGen/X86/block-placement.ll @@ -974,9 +974,14 @@ define void @benchmark_heapsort(i32 %n, double* nocapture %ra) { ; CHECK: %entry ; First rotated loop top. ; CHECK: .align +; CHECK: %while.end +; CHECK: %for.cond +; CHECK: %if.then +; CHECK: %if.else ; CHECK: %if.end10 ; Second rotated loop top ; CHECK: .align +; CHECK: %if.then24 ; CHECK: %while.cond.outer ; Third rotated loop top ; CHECK: .align @@ -985,11 +990,6 @@ define void @benchmark_heapsort(i32 %n, double* nocapture %ra) { ; CHECK: %land.lhs.true ; CHECK: %if.then19 ; CHECK: %if.then19 -; CHECK: %if.then24 -; CHECK: %while.end -; CHECK: %for.cond -; CHECK: %if.then -; CHECK: %if.else ; CHECK: %if.then8 ; CHECK: ret |