summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2
diff options
context:
space:
mode:
authorKyle Butt <kyle+llvm@iteratee.net>2017-01-31 23:48:32 +0000
committerKyle Butt <kyle+llvm@iteratee.net>2017-01-31 23:48:32 +0000
commit5818a513ae843dbe69aab76705837c19cba4f359 (patch)
tree969872c5577128e11c4001311913fbcb4b8e447a /test/CodeGen/Thumb2
parent8f159c8d927e8235ee88cf1c236522f449dc57cb (diff)
CodeGen: Allow small copyable blocks to "break" the CFG.
When choosing the best successor for a block, ordinarily we would have preferred a block that preserves the CFG unless there is a strong probability the other direction. For small blocks that can be duplicated we now skip that requirement as well, subject to some simple frequency calculations. Differential Revision: https://reviews.llvm.org/D28583 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2')
-rw-r--r--test/CodeGen/Thumb2/cbnz.ll2
-rw-r--r--test/CodeGen/Thumb2/ifcvt-compare.ll2
-rw-r--r--test/CodeGen/Thumb2/v8_IT_4.ll5
3 files changed, 5 insertions, 4 deletions
diff --git a/test/CodeGen/Thumb2/cbnz.ll b/test/CodeGen/Thumb2/cbnz.ll
index 5c0bb5bfe1c..e11c4038678 100644
--- a/test/CodeGen/Thumb2/cbnz.ll
+++ b/test/CodeGen/Thumb2/cbnz.ll
@@ -26,7 +26,7 @@ t:
call void @x()
call void @x()
call void @x()
- ; CHECK: cbnz
+ ; CHECK: cbz
%q = icmp eq i32 %y, 0
br i1 %q, label %t2, label %f
diff --git a/test/CodeGen/Thumb2/ifcvt-compare.ll b/test/CodeGen/Thumb2/ifcvt-compare.ll
index 7b5ce4fa3f5..688195f579e 100644
--- a/test/CodeGen/Thumb2/ifcvt-compare.ll
+++ b/test/CodeGen/Thumb2/ifcvt-compare.ll
@@ -4,7 +4,7 @@ declare void @x()
define void @f0(i32 %x) optsize {
; CHECK-LABEL: f0:
- ; CHECK: cbnz
+ ; CHECK: cbz
%p = icmp eq i32 %x, 0
br i1 %p, label %t, label %f
diff --git a/test/CodeGen/Thumb2/v8_IT_4.ll b/test/CodeGen/Thumb2/v8_IT_4.ll
index 5a80d8cd7b4..5901a8e81ca 100644
--- a/test/CodeGen/Thumb2/v8_IT_4.ll
+++ b/test/CodeGen/Thumb2/v8_IT_4.ll
@@ -12,10 +12,11 @@
define weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this, %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) {
; CHECK-LABEL: _ZNKSs7compareERKSs:
-; CHECK: cbnz r0,
+; CHECK: cbz r0,
+; CHECK-NEXT: %bb1
+; CHECK-NEXT: pop.w
; CHECK-NEXT: %bb
; CHECK-NEXT: sub{{(.w)?}} r0, r{{[0-9]+}}, r{{[0-9]+}}
-; CHECK-NEXT: %bb1
; CHECK-NEXT: pop.w
entry:
%0 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i32> [#uses=3]