Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 ; Show that we know how to translate vadd vector instructions. | |
| 2 | |
| 3 ; NOTE: Restricts S and D registers to ones that will better test S/D | |
|
Jim Stichnoth
2016/01/25 21:35:32
This test focuses on the Q registers, not S/D, rig
Eric Holk
2016/01/25 23:56:59
I checked with Karl and he said different vector e
| |
| 4 ; register encodings. | |
| 5 | |
| 6 ; REQUIRES: allow_dump | |
| 7 | |
| 8 ; Compile using standalone assembler. | |
| 9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ | |
| 10 ; RUN: -reg-use s20,s22,d20,d22,q10,q11 \ | |
| 11 ; RUN: | FileCheck %s --check-prefix=ASM | |
| 12 | |
| 13 ; Show bytes in assembled standalone code. | |
| 14 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | |
| 15 ; RUN: --args -O2 \ | |
| 16 ; RUN: -reg-use s20,s22,d20,d22,q10,q11 \ | |
| 17 ; RUN: | FileCheck %s --check-prefix=DIS | |
| 18 | |
| 19 ; Compile using integrated assembler. | |
| 20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ | |
| 21 ; RUN: -reg-use s20,s22,d20,d22,q10,q11 \ | |
| 22 ; RUN: | FileCheck %s --check-prefix=IASM | |
| 23 | |
| 24 ; Show bytes in assembled integrated code. | |
| 25 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | |
| 26 ; RUN: --args -O2 \ | |
| 27 ; RUN: -reg-use s20,s22,d20,d22,q10,q11 \ | |
| 28 ; RUN: | FileCheck %s --check-prefix=DIS | |
| 29 | |
| 30 define internal <4 x float> @testVaddFloat4(<4 x float> %v1, <4 x float> %v2) { | |
| 31 ; ASM-LABEL: testVaddFloat4: | |
| 32 ; DIS-LABEL: 00000000 <testVaddFloat4>: | |
| 33 ; IASM-LABEL: testVaddFloat4: | |
| 34 | |
| 35 entry: | |
| 36 %res = fadd <4 x float> %v1, %v2 | |
| 37 | |
| 38 ; ASM: vadd.f32 q10, q10, q11 | |
| 39 ; DIS: 8: f2444de6 | |
| 40 ; IASM: vadd.f32 | |
| 41 | |
| 42 ret <4 x float> %res | |
| 43 } | |
| 44 | |
| 45 define internal <4 x i32> @testVadd4i32(<4 x i32> %v1, <4 x i32> %v2) { | |
| 46 ; ASM-LABEL: testVadd4i32: | |
| 47 ; DIS-LABEL: 00000020 <testVadd4i32>: | |
| 48 ; IASM-LABEL: testVadd4i32: | |
| 49 | |
| 50 entry: | |
| 51 %res = add <4 x i32> %v1, %v2 | |
| 52 | |
| 53 ; ASM: vadd.i32 q10, q10, q11 | |
| 54 ; DIS: 28: f26448e6 | |
| 55 ; IASM: vadd.i32 | |
| 56 | |
| 57 ret <4 x i32> %res | |
| 58 } | |
| 59 | |
| 60 define internal <8 x i16> @testVadd8i16(<8 x i16> %v1, <8 x i16> %v2) { | |
| 61 ; ASM-LABEL: testVadd8i16: | |
| 62 ; DIS-LABEL: 00000040 <testVadd8i16>: | |
| 63 ; IASM-LABEL: testVadd8i16: | |
| 64 | |
| 65 entry: | |
| 66 %res = add <8 x i16> %v1, %v2 | |
| 67 | |
| 68 ; ASM: vadd.i16 q10, q10, q11 | |
| 69 ; DIS: 48: f25448e6 | |
| 70 ; IASM: vadd.i16 | |
| 71 | |
| 72 ret <8 x i16> %res | |
| 73 } | |
| 74 | |
| 75 define internal <16 x i8> @testVadd16i8(<16 x i8> %v1, <16 x i8> %v2) { | |
| 76 ; ASM-LABEL: testVadd16i8: | |
| 77 ; DIS-LABEL: 00000060 <testVadd16i8>: | |
| 78 ; IASM-LABEL: testVadd16i8: | |
| 79 | |
| 80 entry: | |
| 81 %res = add <16 x i8> %v1, %v2 | |
| 82 | |
| 83 ; ASM: vadd.i8 q10, q10, q11 | |
| 84 ; DIS: 68: f24448e6 | |
| 85 ; IASM: vadd.i8 | |
| 86 | |
| 87 ret <16 x i8> %res | |
| 88 } | |
| OLD | NEW |