Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 ; Show that we know how to translate vsub vector instructions. | |
|
Jim Stichnoth
2016/01/27 21:57:32
vand
| |
| 2 | |
| 3 ; REQUIRES: allow_dump | |
| 4 | |
| 5 ; Compile using standalone assembler. | |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ | |
|
John
2016/01/27 15:22:20
just a comment: I know that you have been using -O
Eric Holk
2016/01/27 19:18:36
Thanks for the tip!
| |
| 7 ; RUN: | FileCheck %s --check-prefix=ASM | |
| 8 | |
| 9 ; Show bytes in assembled standalone code. | |
| 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | |
| 11 ; RUN: --args -O2 \ | |
| 12 ; RUN: | FileCheck %s --check-prefix=DIS | |
| 13 | |
| 14 ; Compile using integrated assembler. | |
| 15 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ | |
| 16 ; RUN: | FileCheck %s --check-prefix=IASM | |
| 17 | |
| 18 ; Show bytes in assembled integrated code. | |
| 19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | |
| 20 ; RUN: --args -O2 \ | |
| 21 ; RUN: | FileCheck %s --check-prefix=DIS | |
| 22 | |
| 23 define internal <4 x i32> @testVand4i32(<4 x i32> %v1, <4 x i32> %v2) { | |
| 24 ; ASM-LABEL: testVand4i32: | |
| 25 ; DIS-LABEL: 00000000 <testVand4i32>: | |
| 26 ; IASM-LABEL: testVand4i32: | |
| 27 | |
| 28 entry: | |
| 29 %res = and <4 x i32> %v1, %v2 | |
| 30 | |
| 31 ; ASM: vand.i32 q0, q0, q1 | |
| 32 ; DIS: 0: f2000152 | |
| 33 ; IASM: vand.i32 | |
| 34 | |
| 35 ret <4 x i32> %res | |
| 36 } | |
| 37 | |
| 38 define internal <8 x i16> @testVand8i16(<8 x i16> %v1, <8 x i16> %v2) { | |
| 39 ; ASM-LABEL: testVand8i16: | |
| 40 ; DIS-LABEL: 00000010 <testVand8i16>: | |
| 41 ; IASM-LABEL: testVand8i16: | |
| 42 | |
| 43 entry: | |
| 44 %res = and <8 x i16> %v1, %v2 | |
| 45 | |
| 46 ; ASM: vand.i16 q0, q0, q1 | |
| 47 ; DIS: 10: f2000152 | |
| 48 ; IASM: vand.i16 | |
| 49 | |
| 50 ret <8 x i16> %res | |
| 51 } | |
| 52 | |
| 53 define internal <16 x i8> @testVand16i8(<16 x i8> %v1, <16 x i8> %v2) { | |
| 54 ; ASM-LABEL: testVand16i8: | |
| 55 ; DIS-LABEL: 00000020 <testVand16i8>: | |
| 56 ; IASM-LABEL: testVand16i8: | |
| 57 | |
| 58 entry: | |
| 59 %res = and <16 x i8> %v1, %v2 | |
| 60 | |
| 61 ; ASM: vand.i8 q0, q0, q1 | |
| 62 ; DIS: 20: f2000152 | |
| 63 ; IASM: vand.i8 | |
| 64 | |
| 65 ret <16 x i8> %res | |
| 66 } | |
| 67 | |
| 68 ;; | |
| 69 ;; The following tests make sure logical and works on predicate vectors. | |
| 70 ;; | |
| 71 | |
| 72 define internal <4 x i1> @testVand4i1(<4 x i1> %v1, <4 x i1> %v2) { | |
| 73 ; ASM-LABEL: testVand4i1: | |
| 74 ; DIS-LABEL: 00000030 <testVand4i1>: | |
| 75 ; IASM-LABEL: testVand4i1: | |
| 76 | |
| 77 entry: | |
| 78 %res = and <4 x i1> %v1, %v2 | |
| 79 | |
| 80 ; ASM: vand.i32 q0, q0, q1 | |
| 81 ; DIS: 30: f2000152 | |
| 82 ; IASM: vand.i32 | |
| 83 | |
| 84 ret <4 x i1> %res | |
| 85 } | |
| 86 | |
| 87 define internal <8 x i1> @testVand8i1(<8 x i1> %v1, <8 x i1> %v2) { | |
| 88 ; ASM-LABEL: testVand8i1: | |
| 89 ; DIS-LABEL: 00000040 <testVand8i1>: | |
| 90 ; IASM-LABEL: testVand8i1: | |
| 91 | |
| 92 entry: | |
| 93 %res = and <8 x i1> %v1, %v2 | |
| 94 | |
| 95 ; ASM: vand.i16 q0, q0, q1 | |
| 96 ; DIS: 40: f2000152 | |
| 97 ; IASM: vand.i16 | |
| 98 | |
| 99 ret <8 x i1> %res | |
| 100 } | |
| 101 | |
| 102 define internal <16 x i1> @testVand16i1(<16 x i1> %v1, <16 x i1> %v2) { | |
| 103 ; ASM-LABEL: testVand16i1: | |
| 104 ; DIS-LABEL: 00000050 <testVand16i1>: | |
| 105 ; IASM-LABEL: testVand16i1: | |
| 106 | |
| 107 entry: | |
| 108 %res = and <16 x i1> %v1, %v2 | |
| 109 | |
| 110 ; ASM: vand.i8 q0, q0, q1 | |
| 111 ; DIS: 50: f2000152 | |
| 112 ; IASM: vand.i8 | |
| 113 | |
| 114 ret <16 x i1> %res | |
| 115 } | |
| OLD | NEW |