Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 ; Show that we know how to translate veor. Does this by noting that | 1 ; Show that we translate intrinsics for fabs on vectors. |
|
Jim Stichnoth
2016/02/17 03:58:39
There's only one such intrinsic, right? Maybe a c
Karl
2016/02/17 17:51:44
Done.
| |
| 2 ; loading a double 0.0 introduces a veor. | |
| 3 | 2 |
| 4 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
| 5 | 4 |
| 6 ; Compile using standalone assembler. | 5 ; Compile using standalone assembler. |
| 7 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
| 7 ; RUN: -reg-use q5 \ | |
| 8 ; RUN: | FileCheck %s --check-prefix=ASM | 8 ; RUN: | FileCheck %s --check-prefix=ASM |
| 9 | 9 |
| 10 ; Show bytes in assembled standalone code. | 10 ; Show bytes in assembled standalone code. |
| 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 12 ; RUN: --args -Om1 \ | 12 ; RUN: --args -Om1 \ |
| 13 ; RUN: -reg-use q5 \ | |
| 13 ; RUN: | FileCheck %s --check-prefix=DIS | 14 ; RUN: | FileCheck %s --check-prefix=DIS |
| 14 | 15 |
| 15 ; Compile using integrated assembler. | 16 ; Compile using integrated assembler. |
| 16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ | 17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ |
| 18 ; RUN: -reg-use q5 \ | |
| 17 ; RUN: | FileCheck %s --check-prefix=IASM | 19 ; RUN: | FileCheck %s --check-prefix=IASM |
| 18 | 20 |
| 19 ; Show bytes in assembled integrated code. | 21 ; Show bytes in assembled integrated code. |
| 20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | 22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
| 21 ; RUN: --args -Om1 \ | 23 ; RUN: --args -Om1 \ |
| 24 ; RUN: -reg-use q5 \ | |
| 22 ; RUN: | FileCheck %s --check-prefix=DIS | 25 ; RUN: | FileCheck %s --check-prefix=DIS |
| 23 | 26 |
| 24 define internal double @testVeor() { | 27 declare <4 x float> @llvm.fabs.v4f32(<4 x float>) |
| 25 ; ASM-LABEL: testVeor: | |
| 26 ; DIS: 00000000 <testVeor>: | |
| 27 | 28 |
| 28 entry: | 29 define internal <4 x float> @_Z6myFabsDv4_f(<4 x float> %a) { |
| 29 ; ASM: .LtestVeor$entry: | 30 ; ASM-LABEL: _Z6myFabsDv4_f: |
| 31 ; DIS-LABEL: {{.+}} <_Z6myFabsDv4_f>: | |
| 32 ; IASM-LABEL: _Z6myFabsDv4_f: | |
| 30 | 33 |
| 31 ret double 0.0 | 34 %x = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a) |
| 32 | 35 |
| 33 ; ASM: veor.f64 d0, d0, d0 | 36 ; ASM: vabs.f32 q5, q5 |
| 34 ; DIS: 0: f3000110 | 37 ; DIS: {{.+}}: f3b9a74a |
| 35 ; IASM-NOT: veor | 38 ; IASM-NOT: vabs.f32 |
| 36 | 39 |
| 40 ret <4 x float> %x | |
| 37 } | 41 } |
| OLD | NEW |