1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple armv7-eabi -o - | FileCheck %s --check-prefixes=CHECK,CHECK-LE
; RUN: llc < %s -mtriple armebv7-eabi -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
define arm_aapcs_vfpcc <8 x i8> @vmov_i8() {
; CHECK-LE-LABEL: vmov_i8:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i8:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000000000
; CHECK-BE-NEXT: vrev64.8 d0, d16
; CHECK-BE-NEXT: bx lr
ret <8 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 -1>
}
define arm_aapcs_vfpcc <4 x i16> @vmov_i16_a() {
; CHECK-LE-LABEL: vmov_i16_a:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xffff000000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i16_a:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xffff000000000000
; CHECK-BE-NEXT: vrev64.16 d0, d16
; CHECK-BE-NEXT: bx lr
ret <4 x i16> <i16 0, i16 0, i16 0, i16 -1>
}
define arm_aapcs_vfpcc <4 x i16> @vmov_i16_b() {
; CHECK-LE-LABEL: vmov_i16_b:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff000000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i16_b:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff000000000000
; CHECK-BE-NEXT: vrev64.16 d0, d16
; CHECK-BE-NEXT: bx lr
ret <4 x i16> <i16 0, i16 0, i16 0, i16 255>
}
define arm_aapcs_vfpcc <4 x i16> @vmov_i16_c() {
; CHECK-LE-LABEL: vmov_i16_c:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i16_c:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000000000
; CHECK-BE-NEXT: vrev64.16 d0, d16
; CHECK-BE-NEXT: bx lr
ret <4 x i16> <i16 0, i16 0, i16 0, i16 65280>
}
define arm_aapcs_vfpcc <2 x i32> @vmov_i32_a() {
; CHECK-LE-LABEL: vmov_i32_a:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xffffffff00000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i32_a:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xffffffff00000000
; CHECK-BE-NEXT: vrev64.32 d0, d16
; CHECK-BE-NEXT: bx lr
ret <2 x i32> <i32 0, i32 -1>
}
define arm_aapcs_vfpcc <2 x i32> @vmov_i32_b() {
; CHECK-LE-LABEL: vmov_i32_b:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i32_b:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000
; CHECK-BE-NEXT: vrev64.32 d0, d16
; CHECK-BE-NEXT: bx lr
ret <2 x i32> <i32 0, i32 255>
}
define arm_aapcs_vfpcc <2 x i32> @vmov_i32_c() {
; CHECK-LE-LABEL: vmov_i32_c:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff0000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i32_c:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff0000000000
; CHECK-BE-NEXT: vrev64.32 d0, d16
; CHECK-BE-NEXT: bx lr
ret <2 x i32> <i32 0, i32 65280>
}
define arm_aapcs_vfpcc <2 x i32> @vmov_i32_d() {
; CHECK-LE-LABEL: vmov_i32_d:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff000000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i32_d:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff000000000000
; CHECK-BE-NEXT: vrev64.32 d0, d16
; CHECK-BE-NEXT: bx lr
ret <2 x i32> <i32 0, i32 16711680>
}
define arm_aapcs_vfpcc <2 x i32> @vmov_i32_e() {
; CHECK-LE-LABEL: vmov_i32_e:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000000000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i32_e:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000000000
; CHECK-BE-NEXT: vrev64.32 d0, d16
; CHECK-BE-NEXT: bx lr
ret <2 x i32> <i32 0, i32 4278190080>
}
define arm_aapcs_vfpcc <1 x i64> @vmov_i64_a() {
; CHECK-LABEL: vmov_i64_a:
; CHECK: @ %bb.0:
; CHECK-NEXT: vmov.i8 d0, #0xff
; CHECK-NEXT: bx lr
ret <1 x i64> <i64 -1>
}
define arm_aapcs_vfpcc <1 x i64> @vmov_i64_b() {
; CHECK-LE-LABEL: vmov_i64_b:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 d0, #0xffff00ff0000ff
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_i64_b:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 d16, #0xff0000ff00ffff00
; CHECK-BE-NEXT: vrev64.32 d0, d16
; CHECK-BE-NEXT: bx lr
ret <1 x i64> <i64 72056498804490495>
}
define arm_aapcs_vfpcc <2 x i64> @vmov_v2i64_b() {
; CHECK-LABEL: vmov_v2i64_b:
; CHECK: @ %bb.0:
; CHECK-NEXT: vmov.i64 q0, #0xffff00ff0000ff
; CHECK-NEXT: bx lr
ret <2 x i64> <i64 72056498804490495, i64 72056498804490495>
}
define arm_aapcs_vfpcc <4 x i32> @vmov_v4i32_b() {
; CHECK-LE-LABEL: vmov_v4i32_b:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 q0, #0xff0000ff00ffff00
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmov_v4i32_b:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 q0, #0xffff00ff0000ff
; CHECK-BE-NEXT: bx lr
ret <4 x i32> <i32 u0xffff00, i32 u0xff0000ff, i32 u0xffff00, i32 u0xff0000ff>
}
define arm_aapcs_vfpcc <2 x i64> @and_v2i64_b(<2 x i64> %a) {
; CHECK-LE-LABEL: and_v2i64_b:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 q8, #0xffff00ff0000ff
; CHECK-LE-NEXT: vand q0, q0, q8
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: and_v2i64_b:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 q8, #0xff0000ff00ffff00
; CHECK-BE-NEXT: vrev64.32 q8, q8
; CHECK-BE-NEXT: vand q0, q0, q8
; CHECK-BE-NEXT: bx lr
%b = and <2 x i64> %a, <i64 72056498804490495, i64 72056498804490495>
ret <2 x i64> %b
}
define arm_aapcs_vfpcc <4 x i32> @and_v4i32_b(<4 x i32> %a) {
; CHECK-LE-LABEL: and_v4i32_b:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmov.i64 q8, #0xff0000ff00ffff00
; CHECK-LE-NEXT: vand q0, q0, q8
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: and_v4i32_b:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmov.i64 q8, #0xff0000ff00ffff00
; CHECK-BE-NEXT: vrev64.32 q9, q0
; CHECK-BE-NEXT: vand q8, q9, q8
; CHECK-BE-NEXT: vrev64.32 q0, q8
; CHECK-BE-NEXT: bx lr
%b = and <4 x i32> %a, <i32 u0xffff00, i32 u0xff0000ff, i32 u0xffff00, i32 u0xff0000ff>
ret <4 x i32> %b
}
define arm_aapcs_vfpcc <8 x i16> @vmvn_v16i8_m1() {
; CHECK-LE-LABEL: vmvn_v16i8_m1:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmvn.i32 q0, #0x10000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: vmvn_v16i8_m1:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmvn.i32 q0, #0x1
; CHECK-BE-NEXT: bx lr
ret <8 x i16> <i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534>
}
define arm_aapcs_vfpcc <8 x i16> @and_v8i16_m1(<8 x i16> %a) {
; CHECK-LE-LABEL: and_v8i16_m1:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vbic.i32 q0, #0x10000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: and_v8i16_m1:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vrev64.16 q8, q0
; CHECK-BE-NEXT: vbic.i32 q8, #0x10000
; CHECK-BE-NEXT: vrev64.16 q0, q8
; CHECK-BE-NEXT: bx lr
%b = and <8 x i16> %a, <i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534>
ret <8 x i16> %b
}
define arm_aapcs_vfpcc <8 x i16> @or_v8i16_1(<8 x i16> %a) {
; CHECK-LE-LABEL: or_v8i16_1:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vorr.i32 q0, #0x10000
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: or_v8i16_1:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vrev64.16 q8, q0
; CHECK-BE-NEXT: vorr.i32 q8, #0x10000
; CHECK-BE-NEXT: vrev64.16 q0, q8
; CHECK-BE-NEXT: bx lr
%b = or <8 x i16> %a, <i16 0, i16 1, i16 0, i16 1, i16 0, i16 1, i16 0, i16 1>
ret <8 x i16> %b
}
define arm_aapcs_vfpcc <8 x i16> @xor_v8i16_m1(<8 x i16> %a) {
; CHECK-LE-LABEL: xor_v8i16_m1:
; CHECK-LE: @ %bb.0:
; CHECK-LE-NEXT: vmvn.i32 q8, #0x10000
; CHECK-LE-NEXT: veor q0, q0, q8
; CHECK-LE-NEXT: bx lr
;
; CHECK-BE-LABEL: xor_v8i16_m1:
; CHECK-BE: @ %bb.0:
; CHECK-BE-NEXT: vmvn.i32 q8, #0x10000
; CHECK-BE-NEXT: vrev64.16 q9, q0
; CHECK-BE-NEXT: veor q8, q9, q8
; CHECK-BE-NEXT: vrev64.16 q0, q8
; CHECK-BE-NEXT: bx lr
%b = xor <8 x i16> %a, <i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534>
ret <8 x i16> %b
}
|