diff options
| author | Kyle Butt <kyle+llvm@iteratee.net> | 2017-01-31 23:48:32 +0000 |
|---|---|---|
| committer | Kyle Butt <kyle+llvm@iteratee.net> | 2017-01-31 23:48:32 +0000 |
| commit | b15c06677c63b4420c7673eb9d5cd37073244780 (patch) | |
| tree | ef004ad1c4a9e3d96c13d1f191f924dfc6c520b2 /llvm/test/CodeGen/Thumb2 | |
| parent | a86be2223013a810ac8653ffa3214efa84245c74 (diff) | |
| download | bcm5719-llvm-b15c06677c63b4420c7673eb9d5cd37073244780.tar.gz bcm5719-llvm-b15c06677c63b4420c7673eb9d5cd37073244780.zip | |
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
llvm-svn: 293716
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
| -rw-r--r-- | llvm/test/CodeGen/Thumb2/cbnz.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/Thumb2/ifcvt-compare.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/Thumb2/v8_IT_4.ll | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/Thumb2/cbnz.ll b/llvm/test/CodeGen/Thumb2/cbnz.ll index 5c0bb5bfe1c..e11c4038678 100644 --- a/llvm/test/CodeGen/Thumb2/cbnz.ll +++ b/llvm/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/llvm/test/CodeGen/Thumb2/ifcvt-compare.ll b/llvm/test/CodeGen/Thumb2/ifcvt-compare.ll index 7b5ce4fa3f5..688195f579e 100644 --- a/llvm/test/CodeGen/Thumb2/ifcvt-compare.ll +++ b/llvm/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/llvm/test/CodeGen/Thumb2/v8_IT_4.ll b/llvm/test/CodeGen/Thumb2/v8_IT_4.ll index 5a80d8cd7b4..5901a8e81ca 100644 --- a/llvm/test/CodeGen/Thumb2/v8_IT_4.ll +++ b/llvm/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] |

