diff options
| author | Gabor Greif <ggreif@gmail.com> | 2010-09-29 10:12:08 +0000 |
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2010-09-29 10:12:08 +0000 |
| commit | 05642a3eba3f35aa8fdf6aa16d87561560e60af3 (patch) | |
| tree | 7b68efc378e845bb211a6adc91d4c3c269d4a7d0 /test/CodeGen/ARM | |
| parent | afa4163afa782c0a39913f2cd4d9c74aa6d9898c (diff) | |
improve heuristics to find the 'and' corresponding to 'tst' to also catch opportunities on thumb2
added some doxygen on the way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
| -rw-r--r-- | test/CodeGen/ARM/arm-and-tst-peephole.ll | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/test/CodeGen/ARM/arm-and-tst-peephole.ll b/test/CodeGen/ARM/arm-and-tst-peephole.ll index 9085b6804c..8d3c0e013b 100644 --- a/test/CodeGen/ARM/arm-and-tst-peephole.ll +++ b/test/CodeGen/ARM/arm-and-tst-peephole.ll @@ -1,5 +1,6 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck -check-prefix=T2 %s +; RUN: llc < %s -march=arm | FileCheck %s +; RUN: llc < %s -march=thumb | FileCheck -check-prefix=THUMB %s +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck -check-prefix=T2 %s %struct.Foo = type { i8* } @@ -18,13 +19,16 @@ tailrecurse: ; preds = %sw.bb, %entry %0 = ptrtoint i8* %tmp2 to i32 ; CHECK: ands r12, r12, #3 -; CHECK-NEXT: beq LBB0_2 +; CHECK-NEXT: beq .LBB0_2 -; T2: movs r5, #3 -; T2-NEXT: mov r6, r4 -; T2-NEXT: ands r6, r5 -; T2-NEXT: tst r4, r5 -; T2-NEXT: beq LBB0_3 +; THUMB: movs r5, #3 +; THUMB-NEXT: mov r6, r4 +; THUMB-NEXT: ands r6, r5 +; THUMB-NEXT: tst r4, r5 +; THUMB-NEXT: beq .LBB0_3 + +; T2: ands r12, r12, #3 +; T2-NEXT: beq .LBB0_3 %and = and i32 %0, 3 %tst = icmp eq i32 %and, 0 |
