diff options
| author | Matthias Braun <matze@braunis.de> | 2015-12-03 17:19:58 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-12-03 17:19:58 +0000 |
| commit | 0d4505c0677796aba5a54069154c8ae491786c0f (patch) | |
| tree | 01a1b3e94e106baab59ed822b09b79807f649827 /llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll | |
| parent | 08819147237f5d83bbe43139e72a5f13c86df4b6 (diff) | |
| download | bcm5719-llvm-0d4505c0677796aba5a54069154c8ae491786c0f.tar.gz bcm5719-llvm-0d4505c0677796aba5a54069154c8ae491786c0f.zip | |
AArch64FastISel: Use cbz/cbnz to branch on i1
In the case of a conditional branch without a preceding cmp we used to emit
a "and; cmp; b.eq/b.ne" sequence, use tbz/tbnz instead.
Differential Revision: http://reviews.llvm.org/D15122
llvm-svn: 254621
Diffstat (limited to 'llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll b/llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll index 5248b9253e7..e04a62b85c8 100644 --- a/llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll +++ b/llvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll @@ -44,9 +44,7 @@ bb4: ; CHECK-NEXT: cmp w1, #0 ; CHECK-NEXT: cset w9, eq ; CHECK-NEXT: orr w8, w8, w9 -; CHECK-NEXT: and w8, w8, #0x1 -; CHECK-NEXT: cmp w8, #0 -; CHECK-NEXT: b.ne +; CHECK-NEXT: tbnz w8, #0, define i64 @test_or_unpredictable(i32 %a, i32 %b) { bb1: %0 = icmp eq i32 %a, 0 @@ -68,9 +66,7 @@ bb4: ; CHECK-NEXT: cmp w1, #0 ; CHECK-NEXT: cset w9, ne ; CHECK-NEXT: and w8, w8, w9 -; CHECK-NEXT: and w8, w8, #0x1 -; CHECK-NEXT: cmp w8, #0 -; CHECK-NEXT: b.eq +; CHECK-NEXT: tbz w8, #0, define i64 @test_and_unpredictable(i32 %a, i32 %b) { bb1: %0 = icmp ne i32 %a, 0 |

