summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-08-07 09:45:24 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-08-07 09:45:24 +0000
commite6450dc2afc18531bf9b70180a9f67376d9f00c7 (patch)
tree88d92e7932ae7528c097316ea06db60180d92d94 /test
parentba86b13ad9cd6a9707a954598863da1e2a9f773b (diff)
downloadllvm-e6450dc2afc18531bf9b70180a9f67376d9f00c7.tar.gz
llvm-e6450dc2afc18531bf9b70180a9f67376d9f00c7.tar.bz2
llvm-e6450dc2afc18531bf9b70180a9f67376d9f00c7.tar.xz
Add a much more conservative strategy for aligning branch targets.
Previously, MBP essentially aligned every branch target it could. This bloats code quite a bit, especially non-looping code which has no real reason to prefer aligned branch targets so heavily. As Andy said in review, it's still a bit odd to do this without a real cost model, but this at least has much more plausible heuristics. Fixes PR13265. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161409 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2008-10-27-CoalescerBug.ll3
-rw-r--r--test/CodeGen/X86/block-placement.ll8
-rw-r--r--test/CodeGen/X86/loop-blocks.ll4
-rw-r--r--test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll1
4 files changed, 10 insertions, 6 deletions
diff --git a/test/CodeGen/X86/2008-10-27-CoalescerBug.ll b/test/CodeGen/X86/2008-10-27-CoalescerBug.ll
index 66f06778bd..b2cf34cd20 100644
--- a/test/CodeGen/X86/2008-10-27-CoalescerBug.ll
+++ b/test/CodeGen/X86/2008-10-27-CoalescerBug.ll
@@ -17,8 +17,7 @@ bb: ; preds = %bb, %entry
; CHECK: %bb30.loopexit
; CHECK: divsd %xmm0
; CHECK: movsd %xmm0, 16(%esp)
-; CHECK: .align
-; CHECK-NEXT: %bb3
+; CHECK: %bb3
bb3: ; preds = %bb30.loopexit, %bb25, %bb3
%2 = load i32* null, align 4 ; <i32> [#uses=1]
%3 = mul i32 %2, 0 ; <i32> [#uses=1]
diff --git a/test/CodeGen/X86/block-placement.ll b/test/CodeGen/X86/block-placement.ll
index ab23b88f49..5534712af8 100644
--- a/test/CodeGen/X86/block-placement.ll
+++ b/test/CodeGen/X86/block-placement.ll
@@ -7,10 +7,15 @@ define i32 @test_ifchains(i32 %i, i32* %a, i32 %b) {
; that is not expected to run.
; CHECK: test_ifchains:
; CHECK: %entry
+; CHECK-NOT: .align
; CHECK: %else1
+; CHECK-NOT: .align
; CHECK: %else2
+; CHECK-NOT: .align
; CHECK: %else3
+; CHECK-NOT: .align
; CHECK: %else4
+; CHECK-NOT: .align
; CHECK: %exit
; CHECK: %then1
; CHECK: %then2
@@ -76,8 +81,11 @@ define i32 @test_loop_cold_blocks(i32 %i, i32* %a) {
; Check that we sink cold loop blocks after the hot loop body.
; CHECK: test_loop_cold_blocks:
; CHECK: %entry
+; CHECK-NOT: .align
; CHECK: %unlikely1
+; CHECK-NOT: .align
; CHECK: %unlikely2
+; CHECK: .align
; CHECK: %body1
; CHECK: %body2
; CHECK: %body3
diff --git a/test/CodeGen/X86/loop-blocks.ll b/test/CodeGen/X86/loop-blocks.ll
index d14102fe24..4bd162b452 100644
--- a/test/CodeGen/X86/loop-blocks.ll
+++ b/test/CodeGen/X86/loop-blocks.ll
@@ -41,7 +41,6 @@ done:
; CHECK-NEXT: align
; CHECK-NEXT: .LBB1_4:
; CHECK-NEXT: callq bar99
-; CHECK-NEXT: align
; CHECK-NEXT: .LBB1_1:
; CHECK-NEXT: callq body
@@ -79,7 +78,6 @@ exit:
; CHECK-NEXT: .LBB2_5:
; CHECK-NEXT: callq block_a_true_func
; CHECK-NEXT: callq block_a_merge_func
-; CHECK-NEXT: align
; CHECK-NEXT: .LBB2_1:
; CHECK-NEXT: callq body
;
@@ -139,13 +137,13 @@ exit:
; CHECK-NEXT: align
; CHECK-NEXT: .LBB3_7:
; CHECK-NEXT: callq bar100
-; CHECK-NEXT: align
; CHECK-NEXT: .LBB3_1:
; CHECK-NEXT: callq loop_header
; CHECK: jl .LBB3_7
; CHECK: jge .LBB3_3
; CHECK-NEXT: callq bar101
; CHECK-NEXT: jmp .LBB3_1
+; CHECK-NEXT: align
; CHECK-NEXT: .LBB3_3:
; CHECK: jge .LBB3_4
; CHECK-NEXT: callq bar102
diff --git a/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll b/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
index a9b815fc45..c3b8b8910d 100644
--- a/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
+++ b/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
@@ -99,7 +99,6 @@ while.end: ; preds = %entry
; CHECK: %for.body3.lr.ph.us.i.loopexit
; CHECK-NEXT: in Loop: Header
; CHECK-NEXT: incq
-; CHECK-NEXT: .align
; CHECK-NEXT: %for.body3.us.i
; CHECK-NEXT: Inner Loop
; CHECK: testb