OLD | NEW |
(Empty) | |
| 1 ; Show that we know how to translate vsub vector instructions. |
| 2 |
| 3 ; REQUIRES: allow_dump |
| 4 |
| 5 ; Compile using standalone assembler. |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ |
| 7 ; RUN: -reg-use q10,q11 \ |
| 8 ; RUN: | FileCheck %s --check-prefix=ASM |
| 9 |
| 10 ; Show bytes in assembled standalone code. |
| 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 12 ; RUN: --args -O2 \ |
| 13 ; RUN: -reg-use q10,q11 \ |
| 14 ; RUN: | FileCheck %s --check-prefix=DIS |
| 15 |
| 16 ; Compile using integrated assembler. |
| 17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ |
| 18 ; RUN: -reg-use q10,q11 \ |
| 19 ; RUN: | FileCheck %s --check-prefix=IASM |
| 20 |
| 21 ; Show bytes in assembled integrated code. |
| 22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
| 23 ; RUN: --args -O2 \ |
| 24 ; RUN: -reg-use q10,q11 \ |
| 25 ; RUN: | FileCheck %s --check-prefix=DIS |
| 26 |
| 27 define internal <4 x float> @testVsubFloat4(<4 x float> %v1, <4 x float> %v2) { |
| 28 ; ASM-LABEL: testVsubFloat4: |
| 29 ; DIS-LABEL: 00000000 <testVsubFloat4>: |
| 30 ; IASM-LABEL: testVsubFloat4: |
| 31 |
| 32 entry: |
| 33 %res = fsub <4 x float> %v1, %v2 |
| 34 |
| 35 ; ASM: vsub.f32 q10, q10, q11 |
| 36 ; DIS: 8: f2644de6 |
| 37 ; IASM: vsub.f32 |
| 38 |
| 39 ret <4 x float> %res |
| 40 } |
| 41 |
| 42 define internal <4 x i32> @testVsub4i32(<4 x i32> %v1, <4 x i32> %v2) { |
| 43 ; ASM-LABEL: testVsub4i32: |
| 44 ; DIS-LABEL: 00000020 <testVsub4i32>: |
| 45 ; IASM-LABEL: testVsub4i32: |
| 46 |
| 47 entry: |
| 48 %res = sub <4 x i32> %v1, %v2 |
| 49 |
| 50 ; ASM: vsub.i32 q10, q10, q11 |
| 51 ; DIS: 28: f36448e6 |
| 52 ; IASM: vsub.i32 |
| 53 |
| 54 ret <4 x i32> %res |
| 55 } |
| 56 |
| 57 define internal <8 x i16> @testVsub8i16(<8 x i16> %v1, <8 x i16> %v2) { |
| 58 ; ASM-LABEL: testVsub8i16: |
| 59 ; DIS-LABEL: 00000040 <testVsub8i16>: |
| 60 ; IASM-LABEL: testVsub8i16: |
| 61 |
| 62 entry: |
| 63 %res = sub <8 x i16> %v1, %v2 |
| 64 |
| 65 ; ASM: vsub.i16 q10, q10, q11 |
| 66 ; DIS: 48: f35448e6 |
| 67 ; IASM: vsub.i16 |
| 68 |
| 69 ret <8 x i16> %res |
| 70 } |
| 71 |
| 72 define internal <16 x i8> @testVsub16i8(<16 x i8> %v1, <16 x i8> %v2) { |
| 73 ; ASM-LABEL: testVsub16i8: |
| 74 ; DIS-LABEL: 00000060 <testVsub16i8>: |
| 75 ; IASM-LABEL: testVsub16i8: |
| 76 |
| 77 entry: |
| 78 %res = sub <16 x i8> %v1, %v2 |
| 79 |
| 80 ; ASM: vsub.i8 q10, q10, q11 |
| 81 ; DIS: 68: f34448e6 |
| 82 ; IASM: vsub.i8 |
| 83 |
| 84 ret <16 x i8> %res |
| 85 } |
OLD | NEW |