OLD | NEW |
1 ; This is a test of C-level conversion operations that clang lowers | 1 ; This is a test of C-level conversion operations that clang lowers |
2 ; into pairs of shifts. | 2 ; into pairs of shifts. |
3 | 3 |
4 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 4 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
5 ; RUN: --target x8632 -i %s --args -O2 \ | 5 ; RUN: --target x8632 -i %s --args -O2 \ |
6 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 6 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
7 | 7 |
8 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 8 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
9 ; RUN: --target x8632 -i %s --args -Om1 \ | 9 ; RUN: --target x8632 -i %s --args -Om1 \ |
10 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 10 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
11 | 11 |
12 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) | 12 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) |
13 ; once enough infrastructure is in. Also, switch to --filetype=obj | 13 ; once enough infrastructure is in. Also, switch to --filetype=obj |
14 ; when possible. | 14 ; when possible. |
15 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 15 ; RUN: %if --need=target_ARM32 --need=allow_dump \ |
| 16 ; RUN: --command %p2i --filetype=asm --assemble \ |
16 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ | 17 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ |
17 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s | 18 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ |
| 19 ; RUN: --command FileCheck --check-prefix ARM32 %s |
18 | 20 |
19 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 21 ; RUN: %if --need=target_ARM32 --need=allow_dump \ |
| 22 ; RUN: --command %p2i --filetype=asm --assemble \ |
20 ; RUN: --disassemble --target arm32 -i %s --args -Om1 --skip-unimplemented \ | 23 ; RUN: --disassemble --target arm32 -i %s --args -Om1 --skip-unimplemented \ |
21 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s | 24 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ |
| 25 ; RUN: --command FileCheck --check-prefix ARM32 %s |
22 | 26 |
23 | 27 |
24 @i1 = internal global [4 x i8] zeroinitializer, align 4 | 28 @i1 = internal global [4 x i8] zeroinitializer, align 4 |
25 @i2 = internal global [4 x i8] zeroinitializer, align 4 | 29 @i2 = internal global [4 x i8] zeroinitializer, align 4 |
26 @u1 = internal global [4 x i8] zeroinitializer, align 4 | 30 @u1 = internal global [4 x i8] zeroinitializer, align 4 |
27 | 31 |
28 define void @conv1() { | 32 define void @conv1() { |
29 entry: | 33 entry: |
30 %__0 = bitcast [4 x i8]* @u1 to i32* | 34 %__0 = bitcast [4 x i8]* @u1 to i32* |
31 %v0 = load i32, i32* %__0, align 1 | 35 %v0 = load i32, i32* %__0, align 1 |
(...skipping 21 matching lines...) Expand all Loading... |
53 store i32 %v1, i32* %__4, align 1 | 57 store i32 %v1, i32* %__4, align 1 |
54 ret void | 58 ret void |
55 } | 59 } |
56 ; CHECK-LABEL: conv2 | 60 ; CHECK-LABEL: conv2 |
57 ; CHECK: shl {{.*}},0x10 | 61 ; CHECK: shl {{.*}},0x10 |
58 ; CHECK: shr {{.*}},0x10 | 62 ; CHECK: shr {{.*}},0x10 |
59 | 63 |
60 ; ARM32-LABEL: conv2 | 64 ; ARM32-LABEL: conv2 |
61 ; ARM32: lsl {{.*}}, #16 | 65 ; ARM32: lsl {{.*}}, #16 |
62 ; ARM32: lsr {{.*}}, #16 | 66 ; ARM32: lsr {{.*}}, #16 |
OLD | NEW |