OLD | NEW |
---|---|
1 ; Show that we translate intrinsics for fabs on float and double. | 1 ; Show that we translate intrinsics for fabs on float, double and |
Jim Stichnoth
2016/02/17 20:59:51
reflow comment to 80-col
(unless that was meant to
Eric Holk
2016/02/17 22:31:56
Done.
| |
2 ; float vectors. | |
2 | 3 |
3 ; REQUIRES: allow_dump | 4 ; REQUIRES: allow_dump |
4 | 5 |
5 ; Compile using standalone assembler. | 6 ; Compile using standalone assembler. |
6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 7 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
7 ; RUN: -reg-use s20,d22 \ | 8 ; RUN: -reg-use s20,d22 \ |
8 ; RUN: | FileCheck %s --check-prefix=ASM | 9 ; RUN: | FileCheck %s --check-prefix=ASM |
9 | 10 |
10 ; Show bytes in assembled standalone code. | 11 ; Show bytes in assembled standalone code. |
11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
12 ; RUN: --args -Om1 \ | 13 ; RUN: --args -Om1 \ |
13 ; RUN: -reg-use s20,d22 \ | 14 ; RUN: -reg-use s20,d22 \ |
14 ; RUN: | FileCheck %s --check-prefix=DIS | 15 ; RUN: | FileCheck %s --check-prefix=DIS |
15 | 16 |
16 ; Compile using integrated assembler. | 17 ; Compile using integrated assembler. |
17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ | 18 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ |
18 ; RUN: -reg-use s20,d22 \ | 19 ; RUN: -reg-use s20,d22 \ |
19 ; RUN: | FileCheck %s --check-prefix=IASM | 20 ; RUN: | FileCheck %s --check-prefix=IASM |
20 | 21 |
21 ; Show bytes in assembled integrated code. | 22 ; Show bytes in assembled integrated code. |
22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | 23 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
23 ; RUN: --args -Om1 \ | 24 ; RUN: --args -Om1 \ |
24 ; RUN: -reg-use s20,d22 \ | 25 ; RUN: -reg-use s20,d22 \ |
25 ; RUN: | FileCheck %s --check-prefix=DIS | 26 ; RUN: | FileCheck %s --check-prefix=DIS |
26 | 27 |
27 declare float @llvm.fabs.f32(float) | 28 declare float @llvm.fabs.f32(float) |
28 declare double @llvm.fabs.f64(double) | 29 declare double @llvm.fabs.f64(double) |
30 declare <4 x float> @llvm.fabs.v4f32(<4 x float>) | |
29 | 31 |
30 define internal float @test_fabs_float(float %x) { | 32 define internal float @test_fabs_float(float %x) { |
31 ; ASM-LABEL: test_fabs_float: | 33 ; ASM-LABEL: test_fabs_float: |
32 ; DIS-LABEL: 00000000 <test_fabs_float>: | 34 ; DIS-LABEL: 00000000 <test_fabs_float>: |
33 ; IASM-LABEL: test_fabs_float: | 35 ; IASM-LABEL: test_fabs_float: |
34 | 36 |
35 entry: | 37 entry: |
36 %r = call float @llvm.fabs.f32(float %x) | 38 %r = call float @llvm.fabs.f32(float %x) |
37 | 39 |
38 ; ASM: vabs.f32 s20, s20 | 40 ; ASM: vabs.f32 s20, s20 |
(...skipping 10 matching lines...) Expand all Loading... | |
49 | 51 |
50 entry: | 52 entry: |
51 %r = call double @llvm.fabs.f64(double %x) | 53 %r = call double @llvm.fabs.f64(double %x) |
52 | 54 |
53 ; ASM: vabs.f64 d22, d22 | 55 ; ASM: vabs.f64 d22, d22 |
54 ; DIS: 3c: eef06be6 | 56 ; DIS: 3c: eef06be6 |
55 ; IASM-NOT: vabs.64 | 57 ; IASM-NOT: vabs.64 |
56 | 58 |
57 ret double %r | 59 ret double %r |
58 } | 60 } |
61 | |
62 define internal <4 x float> @test_fabs_4float(<4 x float> %x) { | |
63 ; ASM-LABEL: test_fabs_4float: | |
64 ; DIS-LABEL: 00000050 <test_fabs_4float>: | |
65 ; IASM-LABEL: test_fabs_4float: | |
66 | |
67 entry: | |
68 %r = call <4 x float> @llvm.fabs.v4f32(<4 x float> %x) | |
69 | |
70 ; ASM: vabs.f32 q0, q0 | |
71 ; DIS: 60: f3b90740 | |
72 ; IASM-NOT: vabs.f32 | |
73 | |
74 ret <4 x float> %r | |
75 } | |
OLD | NEW |