summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/tail-dup-repeat.ll
diff options
context:
space:
mode:
authorGuozhi Wei <carrot@google.com>2019-08-22 16:21:32 +0000
committerGuozhi Wei <carrot@google.com>2019-08-22 16:21:32 +0000
commit51f48295cbe8fa3a44db263b528dd9f7bae7bf9a (patch)
tree28614c4e7fca7431bf287b07453443bacab0f39b /llvm/test/CodeGen/X86/tail-dup-repeat.ll
parent95cf66de7cc186253c59a009bb795da1cbe9d6f4 (diff)
downloadbcm5719-llvm-51f48295cbe8fa3a44db263b528dd9f7bae7bf9a.tar.gz
bcm5719-llvm-51f48295cbe8fa3a44db263b528dd9f7bae7bf9a.zip
[MBP] Disable aggressive loop rotate in plain mode
Patch https://reviews.llvm.org/D43256 introduced more aggressive loop layout optimization which depends on profile information. If profile information is not available, the statically estimated profile information(generated by BranchProbabilityInfo.cpp) is used. If user program doesn't behave as BranchProbabilityInfo.cpp expected, the layout may be worse. To be conservative this patch restores the original layout algorithm in plain mode. But user can still try the aggressive layout optimization with -force-precise-rotation-cost=true. Differential Revision: https://reviews.llvm.org/D65673 llvm-svn: 369664
Diffstat (limited to 'llvm/test/CodeGen/X86/tail-dup-repeat.ll')
-rw-r--r--llvm/test/CodeGen/X86/tail-dup-repeat.ll25
1 files changed, 15 insertions, 10 deletions
diff --git a/llvm/test/CodeGen/X86/tail-dup-repeat.ll b/llvm/test/CodeGen/X86/tail-dup-repeat.ll
index bfa1ee61145..9a1867b8735 100644
--- a/llvm/test/CodeGen/X86/tail-dup-repeat.ll
+++ b/llvm/test/CodeGen/X86/tail-dup-repeat.ll
@@ -10,30 +10,35 @@
define void @repeated_tail_dup(i1 %a1, i1 %a2, i32* %a4, i32* %a5, i8* %a6, i32 %a7) #0 align 2 {
; CHECK-LABEL: repeated_tail_dup:
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: testb $1, %dil
-; CHECK-NEXT: je .LBB0_3
; CHECK-NEXT: .p2align 4, 0x90
-; CHECK-NEXT: .LBB0_2: # %land.lhs.true
-; CHECK-NEXT: movl $10, (%rdx)
-; CHECK-NEXT: .LBB0_6: # %dup2
-; CHECK-NEXT: movl $2, (%rcx)
-; CHECK-NEXT: testl %r9d, %r9d
-; CHECK-NEXT: jne .LBB0_8
; CHECK-NEXT: .LBB0_1: # %for.cond
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
; CHECK-NEXT: testb $1, %dil
-; CHECK-NEXT: jne .LBB0_2
+; CHECK-NEXT: je .LBB0_3
+; CHECK-NEXT: # %bb.2: # %land.lhs.true
+; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
+; CHECK-NEXT: movl $10, (%rdx)
+; CHECK-NEXT: jmp .LBB0_6
+; CHECK-NEXT: .p2align 4, 0x90
; CHECK-NEXT: .LBB0_3: # %if.end56
+; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
; CHECK-NEXT: testb $1, %sil
; CHECK-NEXT: je .LBB0_5
; CHECK-NEXT: # %bb.4: # %if.then64
+; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
; CHECK-NEXT: movb $1, (%r8)
; CHECK-NEXT: testl %r9d, %r9d
; CHECK-NEXT: je .LBB0_1
; CHECK-NEXT: jmp .LBB0_8
; CHECK-NEXT: .p2align 4, 0x90
; CHECK-NEXT: .LBB0_5: # %if.end70
+; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
; CHECK-NEXT: movl $12, (%rdx)
-; CHECK-NEXT: jmp .LBB0_6
+; CHECK-NEXT: .LBB0_6: # %dup2
+; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
+; CHECK-NEXT: movl $2, (%rcx)
+; CHECK-NEXT: testl %r9d, %r9d
+; CHECK-NEXT: je .LBB0_1
; CHECK-NEXT: .LBB0_8: # %for.end
; CHECK-NEXT: retq
entry:
OpenPOWER on IntegriCloud