1 # RUN: llvm-mc %s -triple=x86_64-unknown-unknown | FileCheck %s 2 3 palignr $8, %xmm0, %xmm1 4 # CHECK: xmm1 = xmm0[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7] 5 palignr $8, (%rax), %xmm1 6 # CHECK: xmm1 = mem[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7] 7 8 palignr $16, %xmm0, %xmm1 9 # CHECK: xmm1 = xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 10 palignr $16, (%rax), %xmm1 11 # CHECK: xmm1 = xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 12 13 palignr $0, %xmm0, %xmm1 14 # CHECK: xmm1 = xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 15 palignr $0, (%rax), %xmm1 16 # CHECK: xmm1 = mem[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 17 18 vpalignr $8, %xmm0, %xmm1, %xmm2 19 # CHECK: xmm2 = xmm0[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7] 20 vpalignr $8, (%rax), %xmm1, %xmm2 21 # CHECK: xmm2 = mem[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7] 22 23 vpalignr $16, %xmm0, %xmm1, %xmm2 24 # CHECK: xmm2 = xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 25 vpalignr $16, (%rax), %xmm1, %xmm2 26 # CHECK: xmm2 = xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 27 28 vpalignr $0, %xmm0, %xmm1, %xmm2 29 # CHECK: xmm2 = xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 30 vpalignr $0, (%rax), %xmm1, %xmm2 31 # CHECK: xmm2 = mem[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 32 33 vpalignr $8, %ymm0, %ymm1, %ymm2 34 # CHECK: ymm2 = ymm0[8,9,10,11,12,13,14,15],ymm1[0,1,2,3,4,5,6,7],ymm0[24,25,26,27,28,29,30,31],ymm1[16,17,18,19,20,21,22,23] 35 vpalignr $8, (%rax), %ymm1, %ymm2 36 # CHECK: ymm2 = mem[8,9,10,11,12,13,14,15],ymm1[0,1,2,3,4,5,6,7],mem[24,25,26,27,28,29,30,31],ymm1[16,17,18,19,20,21,22,23] 37 38 vpalignr $16, %ymm0, %ymm1, %ymm2 39 # CHECK: ymm2 = ymm1[0,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] 40 vpalignr $16, (%rax), %ymm1, %ymm2 41 # CHECK: ymm2 = ymm1[0,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] 42 43 vpalignr $0, %ymm0, %ymm1, %ymm2 44 # CHECK: ymm2 = ymm0[0,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] 45 vpalignr $0, (%rax), %ymm1, %ymm2 46 # CHECK: ymm2 = mem[0,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] 47 48 pshufd $27, %xmm0, %xmm1 49 # CHECK: xmm1 = xmm0[3,2,1,0] 50 pshufd $27, (%rax), %xmm1 51 # CHECK: xmm1 = mem[3,2,1,0] 52 53 vpshufd $27, %xmm0, %xmm1 54 # CHECK: xmm1 = xmm0[3,2,1,0] 55 vpshufd $27, (%rax), %xmm1 56 # CHECK: xmm1 = mem[3,2,1,0] 57 58 vpshufd $27, %ymm0, %ymm1 59 # CHECK: ymm1 = ymm0[3,2,1,0,7,6,5,4] 60 vpshufd $27, (%rax), %ymm1 61 # CHECK: ymm1 = mem[3,2,1,0,7,6,5,4] 62 63 punpcklbw %xmm0, %xmm1 64 # CHECK: xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7] 65 punpcklbw (%rax), %xmm1 66 # CHECK: xmm1 = xmm1[0],mem[0],xmm1[1],mem[1],xmm1[2],mem[2],xmm1[3],mem[3],xmm1[4],mem[4],xmm1[5],mem[5],xmm1[6],mem[6],xmm1[7],mem[7] 67 68 vpunpcklbw %xmm0, %xmm1, %xmm2 69 # CHECK: xmm2 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7] 70 vpunpcklbw (%rax), %xmm1, %xmm2 71 # CHECK: xmm2 = xmm1[0],mem[0],xmm1[1],mem[1],xmm1[2],mem[2],xmm1[3],mem[3],xmm1[4],mem[4],xmm1[5],mem[5],xmm1[6],mem[6],xmm1[7],mem[7] 72 73 vpunpcklbw %ymm0, %ymm1, %ymm2 74 # CHECK: ymm2 = ymm1[0],ymm0[0],ymm1[1],ymm0[1],ymm1[2],ymm0[2],ymm1[3],ymm0[3],ymm1[4],ymm0[4],ymm1[5],ymm0[5],ymm1[6],ymm0[6],ymm1[7],ymm0[7],ymm1[16],ymm0[16],ymm1[17],ymm0[17],ymm1[18],ymm0[18],ymm1[19],ymm0[19],ymm1[20],ymm0[20],ymm1[21],ymm0[21],ymm1[22],ymm0[22],ymm1[23],ymm0[23] 75 vpunpcklbw (%rax), %ymm1, %ymm2 76 # CHECK: ymm2 = ymm1[0],mem[0],ymm1[1],mem[1],ymm1[2],mem[2],ymm1[3],mem[3],ymm1[4],mem[4],ymm1[5],mem[5],ymm1[6],mem[6],ymm1[7],mem[7],ymm1[16],mem[16],ymm1[17],mem[17],ymm1[18],mem[18],ymm1[19],mem[19],ymm1[20],mem[20],ymm1[21],mem[21],ymm1[22],mem[22],ymm1[23],mem[23] 77 78 punpckhbw %xmm0, %xmm1 79 # CHECK: xmm1 = xmm1[8],xmm0[8],xmm1[9],xmm0[9],xmm1[10],xmm0[10],xmm1[11],xmm0[11],xmm1[12],xmm0[12],xmm1[13],xmm0[13],xmm1[14],xmm0[14],xmm1[15],xmm0[15] 80 punpckhbw (%rax), %xmm1 81 # CHECK: xmm1 = xmm1[8],mem[8],xmm1[9],mem[9],xmm1[10],mem[10],xmm1[11],mem[11],xmm1[12],mem[12],xmm1[13],mem[13],xmm1[14],mem[14],xmm1[15],mem[15] 82 83 vpunpckhbw %xmm0, %xmm1, %xmm2 84 # CHECK: xmm2 = xmm1[8],xmm0[8],xmm1[9],xmm0[9],xmm1[10],xmm0[10],xmm1[11],xmm0[11],xmm1[12],xmm0[12],xmm1[13],xmm0[13],xmm1[14],xmm0[14],xmm1[15],xmm0[15] 85 vpunpckhbw (%rax), %xmm1, %xmm2 86 # CHECK: xmm2 = xmm1[8],mem[8],xmm1[9],mem[9],xmm1[10],mem[10],xmm1[11],mem[11],xmm1[12],mem[12],xmm1[13],mem[13],xmm1[14],mem[14],xmm1[15],mem[15] 87 88 vpunpckhbw %ymm0, %ymm1, %ymm2 89 # CHECK: ymm2 = ymm1[8],ymm0[8],ymm1[9],ymm0[9],ymm1[10],ymm0[10],ymm1[11],ymm0[11],ymm1[12],ymm0[12],ymm1[13],ymm0[13],ymm1[14],ymm0[14],ymm1[15],ymm0[15],ymm1[24],ymm0[24],ymm1[25],ymm0[25],ymm1[26],ymm0[26],ymm1[27],ymm0[27],ymm1[28],ymm0[28],ymm1[29],ymm0[29],ymm1[30],ymm0[30],ymm1[31],ymm0[31] 90 vpunpckhbw (%rax), %ymm1, %ymm2 91 # CHECK: ymm2 = ymm1[8],mem[8],ymm1[9],mem[9],ymm1[10],mem[10],ymm1[11],mem[11],ymm1[12],mem[12],ymm1[13],mem[13],ymm1[14],mem[14],ymm1[15],mem[15],ymm1[24],mem[24],ymm1[25],mem[25],ymm1[26],mem[26],ymm1[27],mem[27],ymm1[28],mem[28],ymm1[29],mem[29],ymm1[30],mem[30],ymm1[31],mem[31] 92 93 punpcklwd %xmm0, %xmm1 94 # CHECK: xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3] 95 punpcklwd (%rax), %xmm1 96 # CHECK: xmm1 = xmm1[0],mem[0],xmm1[1],mem[1],xmm1[2],mem[2],xmm1[3],mem[3] 97 98 vpunpcklwd %xmm0, %xmm1, %xmm2 99 # CHECK: xmm2 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3] 100 vpunpcklwd (%rax), %xmm1, %xmm2 101 # CHECK: xmm2 = xmm1[0],mem[0],xmm1[1],mem[1],xmm1[2],mem[2],xmm1[3],mem[3] 102 103 vpunpcklwd %ymm0, %ymm1, %ymm2 104 # CHECK: ymm2 = ymm1[0],ymm0[0],ymm1[1],ymm0[1],ymm1[2],ymm0[2],ymm1[3],ymm0[3],ymm1[8],ymm0[8],ymm1[9],ymm0[9],ymm1[10],ymm0[10],ymm1[11],ymm0[11] 105 vpunpcklwd (%rax), %ymm1, %ymm2 106 # CHECK: ymm2 = ymm1[0],mem[0],ymm1[1],mem[1],ymm1[2],mem[2],ymm1[3],mem[3],ymm1[8],mem[8],ymm1[9],mem[9],ymm1[10],mem[10],ymm1[11],mem[11] 107 108 punpckhwd %xmm0, %xmm1 109 # CHECK: xmm1 = xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7] 110 punpckhwd (%rax), %xmm1 111 # CHECK: xmm1 = xmm1[4],mem[4],xmm1[5],mem[5],xmm1[6],mem[6],xmm1[7],mem[7] 112 113 vpunpckhwd %xmm0, %xmm1, %xmm2 114 # CHECK: xmm2 = xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7] 115 vpunpckhwd (%rax), %xmm1, %xmm2 116 # CHECK: xmm2 = xmm1[4],mem[4],xmm1[5],mem[5],xmm1[6],mem[6],xmm1[7],mem[7] 117 118 vpunpckhwd %ymm0, %ymm1, %ymm2 119 # CHECK: ymm2 = ymm1[4],ymm0[4],ymm1[5],ymm0[5],ymm1[6],ymm0[6],ymm1[7],ymm0[7],ymm1[12],ymm0[12],ymm1[13],ymm0[13],ymm1[14],ymm0[14],ymm1[15],ymm0[15] 120 vpunpckhwd (%rax), %ymm1, %ymm2 121 # CHECK: ymm2 = ymm1[4],mem[4],ymm1[5],mem[5],ymm1[6],mem[6],ymm1[7],mem[7],ymm1[12],mem[12],ymm1[13],mem[13],ymm1[14],mem[14],ymm1[15],mem[15] 122 123 punpckldq %xmm0, %xmm1 124 # CHECK: xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] 125 punpckldq (%rax), %xmm1 126 # CHECK: xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] 127 128 vpunpckldq %xmm0, %xmm1, %xmm2 129 # CHECK: xmm2 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] 130 vpunpckldq (%rax), %xmm1, %xmm2 131 # CHECK: xmm2 = xmm1[0],mem[0],xmm1[1],mem[1] 132 133 vpunpckldq %ymm0, %ymm1, %ymm2 134 # CHECK: ymm2 = ymm1[0],ymm0[0],ymm1[1],ymm0[1],ymm1[4],ymm0[4],ymm1[5],ymm0[5] 135 vpunpckldq (%rax), %ymm1, %ymm2 136 # CHECK: ymm2 = ymm1[0],mem[0],ymm1[1],mem[1],ymm1[4],mem[4],ymm1[5],mem[5] 137 138 punpckhdq %xmm0, %xmm1 139 # CHECK: xmm1 = xmm1[2],xmm0[2],xmm1[3],xmm0[3] 140 punpckhdq (%rax), %xmm1 141 # CHECK: xmm1 = xmm1[2],mem[2],xmm1[3],mem[3] 142 143 vpunpckhdq %xmm0, %xmm1, %xmm2 144 # CHECK: xmm2 = xmm1[2],xmm0[2],xmm1[3],xmm0[3] 145 vpunpckhdq (%rax), %xmm1, %xmm2 146 # CHECK: xmm2 = xmm1[2],mem[2],xmm1[3],mem[3] 147 148 vpunpckhdq %ymm0, %ymm1, %ymm2 149 # CHECK: ymm2 = ymm1[2],ymm0[2],ymm1[3],ymm0[3],ymm1[6],ymm0[6],ymm1[7],ymm0[7] 150 vpunpckhdq (%rax), %ymm1, %ymm2 151 # CHECK: ymm2 = ymm1[2],mem[2],ymm1[3],mem[3],ymm1[6],mem[6],ymm1[7],mem[7] 152 153 punpcklqdq %xmm0, %xmm1 154 # CHECK: xmm1 = xmm1[0],xmm0[0] 155 punpcklqdq (%rax), %xmm1 156 # CHECK: xmm1 = xmm1[0],mem[0] 157 158 vpunpcklqdq %xmm0, %xmm1, %xmm2 159 # CHECK: xmm2 = xmm1[0],xmm0[0] 160 vpunpcklqdq (%rax), %xmm1, %xmm2 161 # CHECK: xmm2 = xmm1[0],mem[0] 162 163 vpunpcklqdq %ymm0, %ymm1, %ymm2 164 # CHECK: ymm2 = ymm1[0],ymm0[0],ymm1[2],ymm0[2] 165 vpunpcklqdq (%rax), %ymm1, %ymm2 166 # CHECK: ymm2 = ymm1[0],mem[0],ymm1[2],mem[2] 167 168 punpckhqdq %xmm0, %xmm1 169 # CHECK: xmm1 = xmm1[1],xmm0[1] 170 punpckhqdq (%rax), %xmm1 171 # CHECK: xmm1 = xmm1[1],mem[1] 172 173 vpunpckhqdq %xmm0, %xmm1, %xmm2 174 # CHECK: xmm2 = xmm1[1],xmm0[1] 175 vpunpckhqdq (%rax), %xmm1, %xmm2 176 # CHECK: xmm2 = xmm1[1],mem[1] 177 178 vpunpckhqdq %ymm0, %ymm1, %ymm2 179 # CHECK: ymm2 = ymm1[1],ymm0[1],ymm1[3],ymm0[3] 180 vpunpckhqdq (%rax), %ymm1, %ymm2 181 # CHECK: ymm2 = ymm1[1],mem[1],ymm1[3],mem[3] 182 183 unpcklps %xmm0, %xmm1 184 # CHECK: xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] 185 unpcklps (%rax), %xmm1 186 # CHECK: xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] 187 188 vunpcklps %xmm0, %xmm1, %xmm2 189 # CHECK: xmm2 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] 190 vunpcklps (%rax), %xmm1, %xmm2 191 # CHECK: xmm2 = xmm1[0],mem[0],xmm1[1],mem[1] 192 193 vunpcklps %ymm0, %ymm1, %ymm2 194 # CHECK: ymm2 = ymm1[0],ymm0[0],ymm1[1],ymm0[1],ymm1[4],ymm0[4],ymm1[5],ymm0[5] 195 vunpcklps (%rax), %ymm1, %ymm2 196 # CHECK: ymm2 = ymm1[0],mem[0],ymm1[1],mem[1],ymm1[4],mem[4],ymm1[5],mem[5] 197 198 unpckhps %xmm0, %xmm1 199 # CHECK: xmm1 = xmm1[2],xmm0[2],xmm1[3],xmm0[3] 200 unpckhps (%rax), %xmm1 201 # CHECK: xmm1 = xmm1[2],mem[2],xmm1[3],mem[3] 202 203 vunpckhps %xmm0, %xmm1, %xmm2 204 # CHECK: xmm2 = xmm1[2],xmm0[2],xmm1[3],xmm0[3] 205 vunpckhps (%rax), %xmm1, %xmm2 206 # CHECK: xmm2 = xmm1[2],mem[2],xmm1[3],mem[3] 207 208 vunpckhps %ymm0, %ymm1, %ymm2 209 # CHECK: ymm2 = ymm1[2],ymm0[2],ymm1[3],ymm0[3],ymm1[6],ymm0[6],ymm1[7],ymm0[7] 210 vunpckhps (%rax), %ymm1, %ymm2 211 # CHECK: ymm2 = ymm1[2],mem[2],ymm1[3],mem[3],ymm1[6],mem[6],ymm1[7],mem[7] 212 213 unpcklpd %xmm0, %xmm1 214 # CHECK: xmm1 = xmm1[0],xmm0[0] 215 unpcklpd (%rax), %xmm1 216 # CHECK: xmm1 = xmm1[0],mem[0] 217 218 vunpcklpd %xmm0, %xmm1, %xmm2 219 # CHECK: xmm2 = xmm1[0],xmm0[0] 220 vunpcklpd (%rax), %xmm1, %xmm2 221 # CHECK: xmm2 = xmm1[0],mem[0] 222 223 vunpcklpd %ymm0, %ymm1, %ymm2 224 # CHECK: ymm2 = ymm1[0],ymm0[0],ymm1[2],ymm0[2] 225 vunpcklpd (%rax), %ymm1, %ymm2 226 # CHECK: ymm2 = ymm1[0],mem[0],ymm1[2],mem[2] 227 228 unpckhpd %xmm0, %xmm1 229 # CHECK: xmm1 = xmm1[1],xmm0[1] 230 unpckhpd (%rax), %xmm1 231 # CHECK: xmm1 = xmm1[1],mem[1] 232 233 vunpckhpd %xmm0, %xmm1, %xmm2 234 # CHECK: xmm2 = xmm1[1],xmm0[1] 235 vunpckhpd (%rax), %xmm1, %xmm2 236 # CHECK: xmm2 = xmm1[1],mem[1] 237 238 vunpckhpd %ymm0, %ymm1, %ymm2 239 # CHECK: ymm2 = ymm1[1],ymm0[1],ymm1[3],ymm0[3] 240 vunpckhpd (%rax), %ymm1, %ymm2 241 # CHECK: ymm2 = ymm1[1],mem[1],ymm1[3],mem[3] 242 243 shufps $27, %xmm0, %xmm1 244 # CHECK: xmm1 = xmm1[3,2],xmm0[1,0] 245 shufps $27, (%rax), %xmm1 246 # CHECK: xmm1 = xmm1[3,2],mem[1,0] 247 248 vshufps $27, %xmm0, %xmm1, %xmm2 249 # CHECK: xmm2 = xmm1[3,2],xmm0[1,0] 250 vshufps $27, (%rax), %xmm1, %xmm2 251 # CHECK: xmm2 = xmm1[3,2],mem[1,0] 252 253 vshufps $27, %ymm0, %ymm1, %ymm2 254 # CHECK: ymm2 = ymm1[3,2],ymm0[1,0],ymm1[7,6],ymm0[5,4] 255 vshufps $27, (%rax), %ymm1, %ymm2 256 # CHECK: ymm2 = ymm1[3,2],mem[1,0],ymm1[7,6],mem[5,4] 257 258 shufpd $3, %xmm0, %xmm1 259 # CHECK: xmm1 = xmm1[1],xmm0[1] 260 shufpd $3, (%rax), %xmm1 261 # CHECK: xmm1 = xmm1[1],mem[1] 262 263 vshufpd $3, %xmm0, %xmm1, %xmm2 264 # CHECK: xmm2 = xmm1[1],xmm0[1] 265 vshufpd $3, (%rax), %xmm1, %xmm2 266 # CHECK: xmm2 = xmm1[1],mem[1] 267 268 vshufpd $11, %ymm0, %ymm1, %ymm2 269 # CHECK: ymm2 = ymm1[1],ymm0[1],ymm1[2],ymm0[3] 270 vshufpd $11, (%rax), %ymm1, %ymm2 271 # CHECK: ymm2 = ymm1[1],mem[1],ymm1[2],mem[3] 272 273 vinsertps $16, %xmm0, %xmm1, %xmm2 274 # CHECK: xmm2 = xmm1[0],xmm0[0],xmm1[2,3] 275 vinsertps $16, (%rax), %xmm1, %xmm2 276 # CHECK: xmm2 = xmm1[0],mem[0],xmm1[2,3] 277