llvm.org GIT mirror llvm / 0430a8d
-march=arm -enable-thumb => -march=thumb git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34522 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
15 changed file(s) with 40 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -enable-thumb
0 ; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin
11
22 %struct.rtx_def = type { i8 }
33 @str = external global [7 x i8]
None ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -enable-thumb
0 ; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin
11
22 %struct.color_sample = type { i32 }
33 %struct.ref = type { %struct.color_sample, i16, i16 }
0 ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
2 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | not grep "ldr sp" &&
3 ; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-apple-darwin -enable-thumb | not grep "sub.*r7" &&
4 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep 4294967280
1 ; RUN: llvm-as < %s | llc -march=thumb &&
2 ; RUN: llvm-as < %s | llc -march=thumb | not grep "ldr sp" &&
3 ; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin | not grep "sub.*r7" &&
4 ; RUN: llvm-as < %s | llc -march=thumb | grep 4294967280
55
66 %struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }
77 %struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* }
0 ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
2 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | \
1 ; RUN: llvm-as < %s | llc -march=thumb &&
2 ; RUN: llvm-as < %s | llc -march=thumb | \
33 ; RUN: grep 'ldr.*LCP' | wc -l | grep 5
44
55 define void @test1() {
22 ; RUN: llvm-as < %s | llc -march=arm | grep "ldrh" | wc -l | grep 1 &&
33 ; RUN: llvm-as < %s | llc -march=arm | grep "ldrsb" | wc -l | grep 1 &&
44 ; RUN: llvm-as < %s | llc -march=arm | grep "ldrsh" | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep "ldrb" | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep "ldrh" | wc -l | grep 1 &&
7 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep "ldrsb" | wc -l | grep 1 &&
8 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep "ldrsh" | wc -l | grep 1
5 ; RUN: llvm-as < %s | llc -march=thumb | grep "ldrb" | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=thumb | grep "ldrh" | wc -l | grep 1 &&
7 ; RUN: llvm-as < %s | llc -march=thumb | grep "ldrsb" | wc -l | grep 1 &&
8 ; RUN: llvm-as < %s | llc -march=thumb | grep "ldrsh" | wc -l | grep 1
99
1010 define i32 @test1(i8* %v.pntr.s0.u1) {
1111 %tmp.u = load i8* %v.pntr.s0.u1
0 ; RUN: llvm-as < %s | llc -march=arm &&
11 ; RUN: llvm-as < %s | llc -march=arm | not grep mov &&
2 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
3 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep cpy | wc -l | grep 2
2 ; RUN: llvm-as < %s | llc -march=thumb &&
3 ; RUN: llvm-as < %s | llc -march=thumb | grep cpy | wc -l | grep 2
44
55 define i32 @f1() {
66 %buf = alloca [32 x i32], align 4
0 ; RUN: llvm-as < %s | llc -march=arm &&
11 ; RUN: llvm-as < %s | llc -march=arm | grep cmp | wc -l | grep 2 &&
2 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
3 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep cmp | wc -l | grep 2
2 ; RUN: llvm-as < %s | llc -march=thumb &&
3 ; RUN: llvm-as < %s | llc -march=thumb | grep cmp | wc -l | grep 2
44
55
66 define i1 @t1(i64 %x) {
66 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "sbc" | wc -l | grep 1 &&
77 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "smull" | wc -l | grep 1 &&
88 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "umull" | wc -l | grep 1 &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb | grep "mvn" | wc -l | grep 1 &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb | grep "adc" | wc -l | grep 1 &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb | grep "sbc" | wc -l | grep 1 &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb | grep "__muldi3"
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep "mvn" | wc -l | grep 1 &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep "adc" | wc -l | grep 1 &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep "sbc" | wc -l | grep 1 &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep "__muldi3"
1414
1515 long %f1() {
1616 entry:
22 ; RUN: llvm-as < %s | llc -march=arm | grep __ashldi3 &&
33 ; RUN: llvm-as < %s | llc -march=arm | grep __ashrdi3 &&
44 ; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3 &&
5 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb
5 ; RUN: llvm-as < %s | llc -march=thumb
66
77 define i64 @f0(i64 %A, i64 %B) {
88 %tmp = bitcast i64 %A to i64
0 ; RUN: llvm-as < %s | llc -march=arm &&
11 ; RUN: llvm-as < %s | llc -march=arm | grep mul | wc -l | grep 2 &&
22 ; RUN: llvm-as < %s | llc -march=arm | grep lsl | wc -l | grep 2 &&
3 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep mul | wc -l | grep 3 &&
4 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep lsl | wc -l | grep 1
3 ; RUN: llvm-as < %s | llc -march=thumb | grep mul | wc -l | grep 3 &&
4 ; RUN: llvm-as < %s | llc -march=thumb | grep lsl | wc -l | grep 1
55
66 define i32 @f1(i32 %u) {
77 %tmp = mul i32 %u, %u
55 ; RUN: llvm-as < %s | llc -march=arm | grep movls | wc -l | grep 1 &&
66 ; RUN: llvm-as < %s | llc -march=arm | grep movhi | wc -l | grep 1 &&
77 ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | grep fcpydmi | wc -l | grep 1 &&
8 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep beq | wc -l | grep 1 &&
9 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep bgt | wc -l | grep 1 &&
10 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep blt | wc -l | grep 3 &&
11 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep ble | wc -l | grep 1 &&
12 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep bls | wc -l | grep 1 &&
13 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep bhi | wc -l | grep 1 &&
14 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep __ltdf2
8 ; RUN: llvm-as < %s | llc -march=thumb | grep beq | wc -l | grep 1 &&
9 ; RUN: llvm-as < %s | llc -march=thumb | grep bgt | wc -l | grep 1 &&
10 ; RUN: llvm-as < %s | llc -march=thumb | grep blt | wc -l | grep 3 &&
11 ; RUN: llvm-as < %s | llc -march=thumb | grep ble | wc -l | grep 1 &&
12 ; RUN: llvm-as < %s | llc -march=thumb | grep bls | wc -l | grep 1 &&
13 ; RUN: llvm-as < %s | llc -march=thumb | grep bhi | wc -l | grep 1 &&
14 ; RUN: llvm-as < %s | llc -march=thumb | grep __ltdf2
1515
1616 define i32 @f1(i32 %a.s) {
1717 entry:
0 ; RUN: llvm-as < %s | llc -march=arm &&
11 ; RUN: llvm-as < %s | llc -march=arm | grep add | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
3 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep add | wc -l | grep 1
2 ; RUN: llvm-as < %s | llc -march=thumb &&
3 ; RUN: llvm-as < %s | llc -march=thumb | grep add | wc -l | grep 1
44
55 define void @f1() {
66 %c = alloca i8, align 1
None ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
1 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | not grep CPI
0 ; RUN: llvm-as < %s | llc -march=thumb &&
1 ; RUN: llvm-as < %s | llc -march=thumb | not grep CPI
22
33
44 define i32 @test1() {
0 ; RUN: llvm-as < %s | llc -march=arm &&
11 ; RUN: llvm-as < %s | llc -march=arm | grep movne | wc -l | grep 1 &&
22 ; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
4 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep bne | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep beq | wc -l | grep 1
3 ; RUN: llvm-as < %s | llc -march=thumb &&
4 ; RUN: llvm-as < %s | llc -march=thumb | grep bne | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=thumb | grep beq | wc -l | grep 1
66
77 define i32 @f1(float %X, float %Y) {
88 %tmp = fcmp uno float %X, %Y
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm %%
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -enable-thumb | grep pop | wc -l | grep 2
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep pop | wc -l | grep 2
33
44 %str = internal constant [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1]
55