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