Index: lib/Target/X86/X86InstrAVX512.td =================================================================== --- lib/Target/X86/X86InstrAVX512.td +++ lib/Target/X86/X86InstrAVX512.td @@ -474,27 +474,25 @@ multiclass vinsert_for_size_no_alt { + PatFrag vinsert_insert> { let hasSideEffects = 0, ExeDomain = To.ExeDomain in { - def rr : AVX512AIi8, - EVEX_4V, EVEX_V512; + defm rr : AVX512_maskable, AVX512AIi8Base, EVEX_4V; - let mayLoad = 1 in - def rm : AVX512AIi8, - EVEX_4V, EVEX_V512, EVEX_CD8; + let mayLoad = 1 in + defm rm : AVX512_maskable, AVX512AIi8Base, EVEX_4V, + EVEX_CD8; } } @@ -503,47 +501,64 @@ X86VectorVTInfo AltFrom, X86VectorVTInfo AltTo, PatFrag vinsert_insert, SDNodeXForm INSERT_get_vinsert_imm> : - vinsert_for_size_no_alt { + vinsert_for_size_no_alt { // Codegen pattern with the alternative types, e.g. v2i64 -> v8i64 for // vinserti32x4. Only add this if 64x2 and friends are not supported // natively via AVX512DQ. let Predicates = [NoDQI] in def : Pat<(vinsert_insert:$ins - (AltTo.VT VR512:$src1), (AltFrom.VT From.RC:$src2), (iPTR imm)), - (AltTo.VT (!cast(NAME # From.EltSize # "x4rr") - VR512:$src1, From.RC:$src2, - (INSERT_get_vinsert_imm VR512:$ins)))>; + (AltTo.VT AltTo.RC:$src1), + (AltFrom.VT AltFrom.RC:$src2), (iPTR imm)), + (AltTo.VT (!cast(NAME # From.EltSize # "x" # + From.NumElts # To.ZSuffix # "rr") + To.RC:$src1, From.RC:$src2, + (INSERT_get_vinsert_imm To.RC:$ins)))>; } multiclass vinsert_for_type { - defm NAME # "32x4" : vinsert_for_size, + X86VectorVTInfo< 8, EltVT32, VR256X>, + X86VectorVTInfo< 2, EltVT64, VR128X>, + X86VectorVTInfo< 4, EltVT64, VR256X>, + vinsert128_insert, + INSERT_get_vinsert128_imm>, EVEX_V256; + + defm NAME # "32x4Z" : vinsert_for_size, X86VectorVTInfo<16, EltVT32, VR512>, X86VectorVTInfo< 2, EltVT64, VR128X>, X86VectorVTInfo< 8, EltVT64, VR512>, vinsert128_insert, - INSERT_get_vinsert128_imm>; - let Predicates = [HasDQI] in - defm NAME # "64x2" : vinsert_for_size_no_alt, EVEX_V512; + + let Predicates = [HasVLX, HasDQI] in + defm NAME # "64x2Z256" : vinsert_for_size_no_alt, + X86VectorVTInfo< 4, EltVT64, VR256X>, + vinsert128_insert>, VEX_W, EVEX_V256; + + let Predicates = [HasDQI] in { + defm NAME # "64x2Z" : vinsert_for_size_no_alt, X86VectorVTInfo< 8, EltVT64, VR512>, - vinsert128_insert, - INSERT_get_vinsert128_imm>, VEX_W; - defm NAME # "64x4" : vinsert_for_size, VEX_W, EVEX_V512; + + defm NAME # "32x8Z" : vinsert_for_size_no_alt, + X86VectorVTInfo<16, EltVT32, VR512>, + vinsert256_insert>, EVEX_V512; + } + defm NAME # "64x4Z" : vinsert_for_size, X86VectorVTInfo< 8, EltVT64, VR512>, X86VectorVTInfo< 8, EltVT32, VR256>, X86VectorVTInfo<16, EltVT32, VR512>, vinsert256_insert, - INSERT_get_vinsert256_imm>, VEX_W; - let Predicates = [HasDQI] in - defm NAME # "32x8" : vinsert_for_size_no_alt, - X86VectorVTInfo<16, EltVT32, VR512>, - vinsert256_insert, - INSERT_get_vinsert256_imm>; + INSERT_get_vinsert256_imm>, VEX_W, EVEX_V512; } defm VINSERTF : vinsert_for_type; Index: test/MC/X86/avx512-encodings.s =================================================================== --- test/MC/X86/avx512-encodings.s +++ test/MC/X86/avx512-encodings.s @@ -14958,3 +14958,163 @@ // CHECK: encoding: [0x62,0xf2,0xc5,0x08,0x43,0x92,0xf8,0xfb,0xff,0xff] vgetexpsd -1032(%rdx), %xmm7, %xmm2 +// CHECK: vinsertf32x4 $171, %xmm3, %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0xdb,0xab] + vinsertf32x4 $0xab, %xmm3, %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $171, %xmm3, %zmm26, %zmm11 {%k1} +// CHECK: encoding: [0x62,0x73,0x2d,0x41,0x18,0xdb,0xab] + vinsertf32x4 $0xab, %xmm3, %zmm26, %zmm11 {%k1} + +// CHECK: vinsertf32x4 $171, %xmm3, %zmm26, %zmm11 {%k1} {z} +// CHECK: encoding: [0x62,0x73,0x2d,0xc1,0x18,0xdb,0xab] + vinsertf32x4 $0xab, %xmm3, %zmm26, %zmm11 {%k1} {z} + +// CHECK: vinsertf32x4 $123, %xmm3, %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0xdb,0x7b] + vinsertf32x4 $0x7b, %xmm3, %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $123, (%rcx), %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0x19,0x7b] + vinsertf32x4 $0x7b, (%rcx), %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $123, 291(%rax,%r14,8), %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x33,0x2d,0x40,0x18,0x9c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinsertf32x4 $0x7b, 291(%rax,%r14,8), %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $123, 2032(%rdx), %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0x5a,0x7f,0x7b] + vinsertf32x4 $0x7b, 2032(%rdx), %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $123, 2048(%rdx), %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0x9a,0x00,0x08,0x00,0x00,0x7b] + vinsertf32x4 $0x7b, 2048(%rdx), %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $123, -2048(%rdx), %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0x5a,0x80,0x7b] + vinsertf32x4 $0x7b, -2048(%rdx), %zmm26, %zmm11 + +// CHECK: vinsertf32x4 $123, -2064(%rdx), %zmm26, %zmm11 +// CHECK: encoding: [0x62,0x73,0x2d,0x40,0x18,0x9a,0xf0,0xf7,0xff,0xff,0x7b] + vinsertf32x4 $0x7b, -2064(%rdx), %zmm26, %zmm11 + +// CHECK: vinsertf64x4 $171, %ymm7, %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0xcf,0xab] + vinsertf64x4 $0xab, %ymm7, %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $171, %ymm7, %zmm5, %zmm1 {%k1} +// CHECK: encoding: [0x62,0xf3,0xd5,0x49,0x1a,0xcf,0xab] + vinsertf64x4 $0xab, %ymm7, %zmm5, %zmm1 {%k1} + +// CHECK: vinsertf64x4 $171, %ymm7, %zmm5, %zmm1 {%k1} {z} +// CHECK: encoding: [0x62,0xf3,0xd5,0xc9,0x1a,0xcf,0xab] + vinsertf64x4 $0xab, %ymm7, %zmm5, %zmm1 {%k1} {z} + +// CHECK: vinsertf64x4 $123, %ymm7, %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0xcf,0x7b] + vinsertf64x4 $0x7b, %ymm7, %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $123, (%rcx), %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0x09,0x7b] + vinsertf64x4 $0x7b, (%rcx), %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $123, 291(%rax,%r14,8), %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xb3,0xd5,0x48,0x1a,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinsertf64x4 $0x7b, 291(%rax,%r14,8), %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $123, 4064(%rdx), %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0x4a,0x7f,0x7b] + vinsertf64x4 $0x7b, 4064(%rdx), %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $123, 4096(%rdx), %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0x8a,0x00,0x10,0x00,0x00,0x7b] + vinsertf64x4 $0x7b, 4096(%rdx), %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $123, -4096(%rdx), %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0x4a,0x80,0x7b] + vinsertf64x4 $0x7b, -4096(%rdx), %zmm5, %zmm1 + +// CHECK: vinsertf64x4 $123, -4128(%rdx), %zmm5, %zmm1 +// CHECK: encoding: [0x62,0xf3,0xd5,0x48,0x1a,0x8a,0xe0,0xef,0xff,0xff,0x7b] + vinsertf64x4 $0x7b, -4128(%rdx), %zmm5, %zmm1 + +// CHECK: vinserti32x4 $171, %xmm10, %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xc3,0x15,0x48,0x38,0xca,0xab] + vinserti32x4 $0xab, %xmm10, %zmm13, %zmm17 + +// CHECK: vinserti32x4 $171, %xmm10, %zmm13, %zmm17 {%k6} +// CHECK: encoding: [0x62,0xc3,0x15,0x4e,0x38,0xca,0xab] + vinserti32x4 $0xab, %xmm10, %zmm13, %zmm17 {%k6} + +// CHECK: vinserti32x4 $171, %xmm10, %zmm13, %zmm17 {%k6} {z} +// CHECK: encoding: [0x62,0xc3,0x15,0xce,0x38,0xca,0xab] + vinserti32x4 $0xab, %xmm10, %zmm13, %zmm17 {%k6} {z} + +// CHECK: vinserti32x4 $123, %xmm10, %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xc3,0x15,0x48,0x38,0xca,0x7b] + vinserti32x4 $0x7b, %xmm10, %zmm13, %zmm17 + +// CHECK: vinserti32x4 $123, (%rcx), %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x15,0x48,0x38,0x09,0x7b] + vinserti32x4 $0x7b, (%rcx), %zmm13, %zmm17 + +// CHECK: vinserti32x4 $123, 291(%rax,%r14,8), %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xa3,0x15,0x48,0x38,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinserti32x4 $0x7b, 291(%rax,%r14,8), %zmm13, %zmm17 + +// CHECK: vinserti32x4 $123, 2032(%rdx), %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x15,0x48,0x38,0x4a,0x7f,0x7b] + vinserti32x4 $0x7b, 2032(%rdx), %zmm13, %zmm17 + +// CHECK: vinserti32x4 $123, 2048(%rdx), %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x15,0x48,0x38,0x8a,0x00,0x08,0x00,0x00,0x7b] + vinserti32x4 $0x7b, 2048(%rdx), %zmm13, %zmm17 + +// CHECK: vinserti32x4 $123, -2048(%rdx), %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x15,0x48,0x38,0x4a,0x80,0x7b] + vinserti32x4 $0x7b, -2048(%rdx), %zmm13, %zmm17 + +// CHECK: vinserti32x4 $123, -2064(%rdx), %zmm13, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x15,0x48,0x38,0x8a,0xf0,0xf7,0xff,0xff,0x7b] + vinserti32x4 $0x7b, -2064(%rdx), %zmm13, %zmm17 + +// CHECK: vinserti64x4 $171, %ymm4, %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0xe4,0xab] + vinserti64x4 $0xab, %ymm4, %zmm25, %zmm4 + +// CHECK: vinserti64x4 $171, %ymm4, %zmm25, %zmm4 {%k1} +// CHECK: encoding: [0x62,0xf3,0xb5,0x41,0x3a,0xe4,0xab] + vinserti64x4 $0xab, %ymm4, %zmm25, %zmm4 {%k1} + +// CHECK: vinserti64x4 $171, %ymm4, %zmm25, %zmm4 {%k1} {z} +// CHECK: encoding: [0x62,0xf3,0xb5,0xc1,0x3a,0xe4,0xab] + vinserti64x4 $0xab, %ymm4, %zmm25, %zmm4 {%k1} {z} + +// CHECK: vinserti64x4 $123, %ymm4, %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0xe4,0x7b] + vinserti64x4 $0x7b, %ymm4, %zmm25, %zmm4 + +// CHECK: vinserti64x4 $123, (%rcx), %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0x21,0x7b] + vinserti64x4 $0x7b, (%rcx), %zmm25, %zmm4 + +// CHECK: vinserti64x4 $123, 291(%rax,%r14,8), %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xb3,0xb5,0x40,0x3a,0xa4,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinserti64x4 $0x7b, 291(%rax,%r14,8), %zmm25, %zmm4 + +// CHECK: vinserti64x4 $123, 4064(%rdx), %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0x62,0x7f,0x7b] + vinserti64x4 $0x7b, 4064(%rdx), %zmm25, %zmm4 + +// CHECK: vinserti64x4 $123, 4096(%rdx), %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0xa2,0x00,0x10,0x00,0x00,0x7b] + vinserti64x4 $0x7b, 4096(%rdx), %zmm25, %zmm4 + +// CHECK: vinserti64x4 $123, -4096(%rdx), %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0x62,0x80,0x7b] + vinserti64x4 $0x7b, -4096(%rdx), %zmm25, %zmm4 + +// CHECK: vinserti64x4 $123, -4128(%rdx), %zmm25, %zmm4 +// CHECK: encoding: [0x62,0xf3,0xb5,0x40,0x3a,0xa2,0xe0,0xef,0xff,0xff,0x7b] + vinserti64x4 $0x7b, -4128(%rdx), %zmm25, %zmm4 + Index: test/MC/X86/x86-64-avx512dq.s =================================================================== --- test/MC/X86/x86-64-avx512dq.s +++ test/MC/X86/x86-64-avx512dq.s @@ -2371,3 +2371,323 @@ // CHECK: encoding: [0x62,0xa1,0xff,0xca,0x7a,0xd5] vcvtuqq2ps %zmm21, %ymm18 {%k2} {z} +// CHECK: vinsertf32x8 $171, %ymm24, %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x03,0x75,0x40,0x1a,0xe8,0xab] + vinsertf32x8 $0xab, %ymm24, %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $171, %ymm24, %zmm17, %zmm29 {%k3} +// CHECK: encoding: [0x62,0x03,0x75,0x43,0x1a,0xe8,0xab] + vinsertf32x8 $0xab, %ymm24, %zmm17, %zmm29 {%k3} + +// CHECK: vinsertf32x8 $171, %ymm24, %zmm17, %zmm29 {%k3} {z} +// CHECK: encoding: [0x62,0x03,0x75,0xc3,0x1a,0xe8,0xab] + vinsertf32x8 $0xab, %ymm24, %zmm17, %zmm29 {%k3} {z} + +// CHECK: vinsertf32x8 $123, %ymm24, %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x03,0x75,0x40,0x1a,0xe8,0x7b] + vinsertf32x8 $0x7b, %ymm24, %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $123, (%rcx), %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x63,0x75,0x40,0x1a,0x29,0x7b] + vinsertf32x8 $0x7b,(%rcx), %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $123, 291(%rax,%r14,8), %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x23,0x75,0x40,0x1a,0xac,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinsertf32x8 $0x7b,291(%rax,%r14,8), %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $123, 4064(%rdx), %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x63,0x75,0x40,0x1a,0x6a,0x7f,0x7b] + vinsertf32x8 $0x7b,4064(%rdx), %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $123, 4096(%rdx), %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x63,0x75,0x40,0x1a,0xaa,0x00,0x10,0x00,0x00,0x7b] + vinsertf32x8 $0x7b,4096(%rdx), %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $123, -4096(%rdx), %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x63,0x75,0x40,0x1a,0x6a,0x80,0x7b] + vinsertf32x8 $0x7b,-4096(%rdx), %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $123, -4128(%rdx), %zmm17, %zmm29 +// CHECK: encoding: [0x62,0x63,0x75,0x40,0x1a,0xaa,0xe0,0xef,0xff,0xff,0x7b] + vinsertf32x8 $0x7b,-4128(%rdx), %zmm17, %zmm29 + +// CHECK: vinsertf32x8 $171, %ymm22, %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x23,0x1d,0x40,0x1a,0xee,0xab] + vinsertf32x8 $0xab, %ymm22, %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $171, %ymm22, %zmm28, %zmm29 {%k5} +// CHECK: encoding: [0x62,0x23,0x1d,0x45,0x1a,0xee,0xab] + vinsertf32x8 $0xab, %ymm22, %zmm28, %zmm29 {%k5} + +// CHECK: vinsertf32x8 $171, %ymm22, %zmm28, %zmm29 {%k5} {z} +// CHECK: encoding: [0x62,0x23,0x1d,0xc5,0x1a,0xee,0xab] + vinsertf32x8 $0xab, %ymm22, %zmm28, %zmm29 {%k5} {z} + +// CHECK: vinsertf32x8 $123, %ymm22, %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x23,0x1d,0x40,0x1a,0xee,0x7b] + vinsertf32x8 $0x7b, %ymm22, %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $123, (%rcx), %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x63,0x1d,0x40,0x1a,0x29,0x7b] + vinsertf32x8 $0x7b,(%rcx), %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $123, 4660(%rax,%r14,8), %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x23,0x1d,0x40,0x1a,0xac,0xf0,0x34,0x12,0x00,0x00,0x7b] + vinsertf32x8 $0x7b,4660(%rax,%r14,8), %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $123, 4064(%rdx), %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x63,0x1d,0x40,0x1a,0x6a,0x7f,0x7b] + vinsertf32x8 $0x7b,4064(%rdx), %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $123, 4096(%rdx), %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x63,0x1d,0x40,0x1a,0xaa,0x00,0x10,0x00,0x00,0x7b] + vinsertf32x8 $0x7b,4096(%rdx), %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $123, -4096(%rdx), %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x63,0x1d,0x40,0x1a,0x6a,0x80,0x7b] + vinsertf32x8 $0x7b,-4096(%rdx), %zmm28, %zmm29 + +// CHECK: vinsertf32x8 $123, -4128(%rdx), %zmm28, %zmm29 +// CHECK: encoding: [0x62,0x63,0x1d,0x40,0x1a,0xaa,0xe0,0xef,0xff,0xff,0x7b] + vinsertf32x8 $0x7b,-4128(%rdx), %zmm28, %zmm29 + +// CHECK: vinsertf64x2 $171, %xmm25, %zmm28, %zmm17 +// CHECK: encoding: [0x62,0x83,0x9d,0x40,0x18,0xc9,0xab] + vinsertf64x2 $0xab, %xmm25, %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $171, %xmm25, %zmm28, %zmm17 {%k2} +// CHECK: encoding: [0x62,0x83,0x9d,0x42,0x18,0xc9,0xab] + vinsertf64x2 $0xab, %xmm25, %zmm28, %zmm17 {%k2} + +// CHECK: vinsertf64x2 $171, %xmm25, %zmm28, %zmm17 {%k2} {z} +// CHECK: encoding: [0x62,0x83,0x9d,0xc2,0x18,0xc9,0xab] + vinsertf64x2 $0xab, %xmm25, %zmm28, %zmm17 {%k2} {z} + +// CHECK: vinsertf64x2 $123, %xmm25, %zmm28, %zmm17 +// CHECK: encoding: [0x62,0x83,0x9d,0x40,0x18,0xc9,0x7b] + vinsertf64x2 $0x7b, %xmm25, %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $123, (%rcx), %zmm28, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x9d,0x40,0x18,0x09,0x7b] + vinsertf64x2 $0x7b,(%rcx), %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $123, 291(%rax,%r14,8), %zmm28, %zmm17 +// CHECK: encoding: [0x62,0xa3,0x9d,0x40,0x18,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,291(%rax,%r14,8), %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $123, 2032(%rdx), %zmm28, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x9d,0x40,0x18,0x4a,0x7f,0x7b] + vinsertf64x2 $0x7b,2032(%rdx), %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $123, 2048(%rdx), %zmm28, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x9d,0x40,0x18,0x8a,0x00,0x08,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,2048(%rdx), %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $123, -2048(%rdx), %zmm28, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x9d,0x40,0x18,0x4a,0x80,0x7b] + vinsertf64x2 $0x7b,-2048(%rdx), %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $123, -2064(%rdx), %zmm28, %zmm17 +// CHECK: encoding: [0x62,0xe3,0x9d,0x40,0x18,0x8a,0xf0,0xf7,0xff,0xff,0x7b] + vinsertf64x2 $0x7b,-2064(%rdx), %zmm28, %zmm17 + +// CHECK: vinsertf64x2 $171, %xmm28, %zmm17, %zmm20 +// CHECK: encoding: [0x62,0x83,0xf5,0x40,0x18,0xe4,0xab] + vinsertf64x2 $0xab, %xmm28, %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $171, %xmm28, %zmm17, %zmm20 {%k7} +// CHECK: encoding: [0x62,0x83,0xf5,0x47,0x18,0xe4,0xab] + vinsertf64x2 $0xab, %xmm28, %zmm17, %zmm20 {%k7} + +// CHECK: vinsertf64x2 $171, %xmm28, %zmm17, %zmm20 {%k7} {z} +// CHECK: encoding: [0x62,0x83,0xf5,0xc7,0x18,0xe4,0xab] + vinsertf64x2 $0xab, %xmm28, %zmm17, %zmm20 {%k7} {z} + +// CHECK: vinsertf64x2 $123, %xmm28, %zmm17, %zmm20 +// CHECK: encoding: [0x62,0x83,0xf5,0x40,0x18,0xe4,0x7b] + vinsertf64x2 $0x7b, %xmm28, %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $123, (%rcx), %zmm17, %zmm20 +// CHECK: encoding: [0x62,0xe3,0xf5,0x40,0x18,0x21,0x7b] + vinsertf64x2 $0x7b,(%rcx), %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $123, 4660(%rax,%r14,8), %zmm17, %zmm20 +// CHECK: encoding: [0x62,0xa3,0xf5,0x40,0x18,0xa4,0xf0,0x34,0x12,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,4660(%rax,%r14,8), %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $123, 2032(%rdx), %zmm17, %zmm20 +// CHECK: encoding: [0x62,0xe3,0xf5,0x40,0x18,0x62,0x7f,0x7b] + vinsertf64x2 $0x7b,2032(%rdx), %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $123, 2048(%rdx), %zmm17, %zmm20 +// CHECK: encoding: [0x62,0xe3,0xf5,0x40,0x18,0xa2,0x00,0x08,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,2048(%rdx), %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $123, -2048(%rdx), %zmm17, %zmm20 +// CHECK: encoding: [0x62,0xe3,0xf5,0x40,0x18,0x62,0x80,0x7b] + vinsertf64x2 $0x7b,-2048(%rdx), %zmm17, %zmm20 + +// CHECK: vinsertf64x2 $123, -2064(%rdx), %zmm17, %zmm20 +// CHECK: encoding: [0x62,0xe3,0xf5,0x40,0x18,0xa2,0xf0,0xf7,0xff,0xff,0x7b] + vinsertf64x2 $0x7b,-2064(%rdx), %zmm17, %zmm20 + +// CHECK: vinserti32x8 $171, %ymm22, %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x23,0x3d,0x40,0x3a,0xe6,0xab] + vinserti32x8 $0xab, %ymm22, %zmm24, %zmm28 + +// CHECK: vinserti32x8 $171, %ymm22, %zmm24, %zmm28 {%k2} +// CHECK: encoding: [0x62,0x23,0x3d,0x42,0x3a,0xe6,0xab] + vinserti32x8 $0xab, %ymm22, %zmm24, %zmm28 {%k2} + +// CHECK: vinserti32x8 $171, %ymm22, %zmm24, %zmm28 {%k2} {z} +// CHECK: encoding: [0x62,0x23,0x3d,0xc2,0x3a,0xe6,0xab] + vinserti32x8 $0xab, %ymm22, %zmm24, %zmm28 {%k2} {z} + +// CHECK: vinserti32x8 $123, %ymm22, %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x23,0x3d,0x40,0x3a,0xe6,0x7b] + vinserti32x8 $0x7b, %ymm22, %zmm24, %zmm28 + +// CHECK: vinserti32x8 $123, (%rcx), %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x63,0x3d,0x40,0x3a,0x21,0x7b] + vinserti32x8 $0x7b,(%rcx), %zmm24, %zmm28 + +// CHECK: vinserti32x8 $123, 291(%rax,%r14,8), %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x23,0x3d,0x40,0x3a,0xa4,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinserti32x8 $0x7b,291(%rax,%r14,8), %zmm24, %zmm28 + +// CHECK: vinserti32x8 $123, 4064(%rdx), %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x63,0x3d,0x40,0x3a,0x62,0x7f,0x7b] + vinserti32x8 $0x7b,4064(%rdx), %zmm24, %zmm28 + +// CHECK: vinserti32x8 $123, 4096(%rdx), %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x63,0x3d,0x40,0x3a,0xa2,0x00,0x10,0x00,0x00,0x7b] + vinserti32x8 $0x7b,4096(%rdx), %zmm24, %zmm28 + +// CHECK: vinserti32x8 $123, -4096(%rdx), %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x63,0x3d,0x40,0x3a,0x62,0x80,0x7b] + vinserti32x8 $0x7b,-4096(%rdx), %zmm24, %zmm28 + +// CHECK: vinserti32x8 $123, -4128(%rdx), %zmm24, %zmm28 +// CHECK: encoding: [0x62,0x63,0x3d,0x40,0x3a,0xa2,0xe0,0xef,0xff,0xff,0x7b] + vinserti32x8 $0x7b,-4128(%rdx), %zmm24, %zmm28 + +// CHECK: vinserti32x8 $171, %ymm24, %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x03,0x5d,0x40,0x3a,0xe0,0xab] + vinserti32x8 $0xab, %ymm24, %zmm20, %zmm28 + +// CHECK: vinserti32x8 $171, %ymm24, %zmm20, %zmm28 {%k7} +// CHECK: encoding: [0x62,0x03,0x5d,0x47,0x3a,0xe0,0xab] + vinserti32x8 $0xab, %ymm24, %zmm20, %zmm28 {%k7} + +// CHECK: vinserti32x8 $171, %ymm24, %zmm20, %zmm28 {%k7} {z} +// CHECK: encoding: [0x62,0x03,0x5d,0xc7,0x3a,0xe0,0xab] + vinserti32x8 $0xab, %ymm24, %zmm20, %zmm28 {%k7} {z} + +// CHECK: vinserti32x8 $123, %ymm24, %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x03,0x5d,0x40,0x3a,0xe0,0x7b] + vinserti32x8 $0x7b, %ymm24, %zmm20, %zmm28 + +// CHECK: vinserti32x8 $123, (%rcx), %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x63,0x5d,0x40,0x3a,0x21,0x7b] + vinserti32x8 $0x7b,(%rcx), %zmm20, %zmm28 + +// CHECK: vinserti32x8 $123, 4660(%rax,%r14,8), %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x23,0x5d,0x40,0x3a,0xa4,0xf0,0x34,0x12,0x00,0x00,0x7b] + vinserti32x8 $0x7b,4660(%rax,%r14,8), %zmm20, %zmm28 + +// CHECK: vinserti32x8 $123, 4064(%rdx), %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x63,0x5d,0x40,0x3a,0x62,0x7f,0x7b] + vinserti32x8 $0x7b,4064(%rdx), %zmm20, %zmm28 + +// CHECK: vinserti32x8 $123, 4096(%rdx), %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x63,0x5d,0x40,0x3a,0xa2,0x00,0x10,0x00,0x00,0x7b] + vinserti32x8 $0x7b,4096(%rdx), %zmm20, %zmm28 + +// CHECK: vinserti32x8 $123, -4096(%rdx), %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x63,0x5d,0x40,0x3a,0x62,0x80,0x7b] + vinserti32x8 $0x7b,-4096(%rdx), %zmm20, %zmm28 + +// CHECK: vinserti32x8 $123, -4128(%rdx), %zmm20, %zmm28 +// CHECK: encoding: [0x62,0x63,0x5d,0x40,0x3a,0xa2,0xe0,0xef,0xff,0xff,0x7b] + vinserti32x8 $0x7b,-4128(%rdx), %zmm20, %zmm28 + +// CHECK: vinserti64x2 $171, %xmm26, %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x03,0xed,0x40,0x38,0xe2,0xab] + vinserti64x2 $0xab, %xmm26, %zmm18, %zmm28 + +// CHECK: vinserti64x2 $171, %xmm26, %zmm18, %zmm28 {%k7} +// CHECK: encoding: [0x62,0x03,0xed,0x47,0x38,0xe2,0xab] + vinserti64x2 $0xab, %xmm26, %zmm18, %zmm28 {%k7} + +// CHECK: vinserti64x2 $171, %xmm26, %zmm18, %zmm28 {%k7} {z} +// CHECK: encoding: [0x62,0x03,0xed,0xc7,0x38,0xe2,0xab] + vinserti64x2 $0xab, %xmm26, %zmm18, %zmm28 {%k7} {z} + +// CHECK: vinserti64x2 $123, %xmm26, %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x03,0xed,0x40,0x38,0xe2,0x7b] + vinserti64x2 $0x7b, %xmm26, %zmm18, %zmm28 + +// CHECK: vinserti64x2 $123, (%rcx), %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x21,0x7b] + vinserti64x2 $0x7b,(%rcx), %zmm18, %zmm28 + +// CHECK: vinserti64x2 $123, 291(%rax,%r14,8), %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x23,0xed,0x40,0x38,0xa4,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinserti64x2 $0x7b,291(%rax,%r14,8), %zmm18, %zmm28 + +// CHECK: vinserti64x2 $123, 2032(%rdx), %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x62,0x7f,0x7b] + vinserti64x2 $0x7b,2032(%rdx), %zmm18, %zmm28 + +// CHECK: vinserti64x2 $123, 2048(%rdx), %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0xa2,0x00,0x08,0x00,0x00,0x7b] + vinserti64x2 $0x7b,2048(%rdx), %zmm18, %zmm28 + +// CHECK: vinserti64x2 $123, -2048(%rdx), %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x62,0x80,0x7b] + vinserti64x2 $0x7b,-2048(%rdx), %zmm18, %zmm28 + +// CHECK: vinserti64x2 $123, -2064(%rdx), %zmm18, %zmm28 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0xa2,0xf0,0xf7,0xff,0xff,0x7b] + vinserti64x2 $0x7b,-2064(%rdx), %zmm18, %zmm28 + +// CHECK: vinserti64x2 $171, %xmm21, %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x23,0xed,0x40,0x38,0xdd,0xab] + vinserti64x2 $0xab, %xmm21, %zmm18, %zmm27 + +// CHECK: vinserti64x2 $171, %xmm21, %zmm18, %zmm27 {%k2} +// CHECK: encoding: [0x62,0x23,0xed,0x42,0x38,0xdd,0xab] + vinserti64x2 $0xab, %xmm21, %zmm18, %zmm27 {%k2} + +// CHECK: vinserti64x2 $171, %xmm21, %zmm18, %zmm27 {%k2} {z} +// CHECK: encoding: [0x62,0x23,0xed,0xc2,0x38,0xdd,0xab] + vinserti64x2 $0xab, %xmm21, %zmm18, %zmm27 {%k2} {z} + +// CHECK: vinserti64x2 $123, %xmm21, %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x23,0xed,0x40,0x38,0xdd,0x7b] + vinserti64x2 $0x7b, %xmm21, %zmm18, %zmm27 + +// CHECK: vinserti64x2 $123, (%rcx), %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x19,0x7b] + vinserti64x2 $0x7b,(%rcx), %zmm18, %zmm27 + +// CHECK: vinserti64x2 $123, 4660(%rax,%r14,8), %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x23,0xed,0x40,0x38,0x9c,0xf0,0x34,0x12,0x00,0x00,0x7b] + vinserti64x2 $0x7b,4660(%rax,%r14,8), %zmm18, %zmm27 + +// CHECK: vinserti64x2 $123, 2032(%rdx), %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x5a,0x7f,0x7b] + vinserti64x2 $0x7b,2032(%rdx), %zmm18, %zmm27 + +// CHECK: vinserti64x2 $123, 2048(%rdx), %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x9a,0x00,0x08,0x00,0x00,0x7b] + vinserti64x2 $0x7b,2048(%rdx), %zmm18, %zmm27 + +// CHECK: vinserti64x2 $123, -2048(%rdx), %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x5a,0x80,0x7b] + vinserti64x2 $0x7b,-2048(%rdx), %zmm18, %zmm27 + +// CHECK: vinserti64x2 $123, -2064(%rdx), %zmm18, %zmm27 +// CHECK: encoding: [0x62,0x63,0xed,0x40,0x38,0x9a,0xf0,0xf7,0xff,0xff,0x7b] + vinserti64x2 $0x7b,-2064(%rdx), %zmm18, %zmm27 + Index: test/MC/X86/x86-64-avx512dq_vl.s =================================================================== --- test/MC/X86/x86-64-avx512dq_vl.s +++ test/MC/X86/x86-64-avx512dq_vl.s @@ -3584,3 +3584,163 @@ // CHECK: encoding: [0x62,0x61,0xff,0x38,0x7a,0xa2,0xf8,0xfb,0xff,0xff] vcvtuqq2ps -1032(%rdx){1to4}, %xmm28 +// CHECK: vinsertf64x2 $171, %xmm23, %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xa3,0xa5,0x20,0x18,0xef,0xab] + vinsertf64x2 $0xab, %xmm23, %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $171, %xmm23, %ymm27, %ymm21 {%k7} +// CHECK: encoding: [0x62,0xa3,0xa5,0x27,0x18,0xef,0xab] + vinsertf64x2 $0xab, %xmm23, %ymm27, %ymm21 {%k7} + +// CHECK: vinsertf64x2 $171, %xmm23, %ymm27, %ymm21 {%k7} {z} +// CHECK: encoding: [0x62,0xa3,0xa5,0xa7,0x18,0xef,0xab] + vinsertf64x2 $0xab, %xmm23, %ymm27, %ymm21 {%k7} {z} + +// CHECK: vinsertf64x2 $123, %xmm23, %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xa3,0xa5,0x20,0x18,0xef,0x7b] + vinsertf64x2 $0x7b, %xmm23, %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $123, (%rcx), %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xe3,0xa5,0x20,0x18,0x29,0x7b] + vinsertf64x2 $0x7b,(%rcx), %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $123, 291(%rax,%r14,8), %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xa3,0xa5,0x20,0x18,0xac,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,291(%rax,%r14,8), %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $123, 2032(%rdx), %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xe3,0xa5,0x20,0x18,0x6a,0x7f,0x7b] + vinsertf64x2 $0x7b,2032(%rdx), %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $123, 2048(%rdx), %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xe3,0xa5,0x20,0x18,0xaa,0x00,0x08,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,2048(%rdx), %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $123, -2048(%rdx), %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xe3,0xa5,0x20,0x18,0x6a,0x80,0x7b] + vinsertf64x2 $0x7b,-2048(%rdx), %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $123, -2064(%rdx), %ymm27, %ymm21 +// CHECK: encoding: [0x62,0xe3,0xa5,0x20,0x18,0xaa,0xf0,0xf7,0xff,0xff,0x7b] + vinsertf64x2 $0x7b,-2064(%rdx), %ymm27, %ymm21 + +// CHECK: vinsertf64x2 $171, %xmm27, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x03,0xc5,0x20,0x18,0xc3,0xab] + vinsertf64x2 $0xab, %xmm27, %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $171, %xmm27, %ymm23, %ymm24 {%k5} +// CHECK: encoding: [0x62,0x03,0xc5,0x25,0x18,0xc3,0xab] + vinsertf64x2 $0xab, %xmm27, %ymm23, %ymm24 {%k5} + +// CHECK: vinsertf64x2 $171, %xmm27, %ymm23, %ymm24 {%k5} {z} +// CHECK: encoding: [0x62,0x03,0xc5,0xa5,0x18,0xc3,0xab] + vinsertf64x2 $0xab, %xmm27, %ymm23, %ymm24 {%k5} {z} + +// CHECK: vinsertf64x2 $123, %xmm27, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x03,0xc5,0x20,0x18,0xc3,0x7b] + vinsertf64x2 $0x7b, %xmm27, %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $123, (%rcx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0xc5,0x20,0x18,0x01,0x7b] + vinsertf64x2 $0x7b,(%rcx), %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $123, 4660(%rax,%r14,8), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x23,0xc5,0x20,0x18,0x84,0xf0,0x34,0x12,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,4660(%rax,%r14,8), %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $123, 2032(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0xc5,0x20,0x18,0x42,0x7f,0x7b] + vinsertf64x2 $0x7b,2032(%rdx), %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $123, 2048(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0xc5,0x20,0x18,0x82,0x00,0x08,0x00,0x00,0x7b] + vinsertf64x2 $0x7b,2048(%rdx), %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $123, -2048(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0xc5,0x20,0x18,0x42,0x80,0x7b] + vinsertf64x2 $0x7b,-2048(%rdx), %ymm23, %ymm24 + +// CHECK: vinsertf64x2 $123, -2064(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0xc5,0x20,0x18,0x82,0xf0,0xf7,0xff,0xff,0x7b] + vinsertf64x2 $0x7b,-2064(%rdx), %ymm23, %ymm24 + +// CHECK: vinserti64x2 $171, %xmm21, %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xa3,0xb5,0x20,0x38,0xdd,0xab] + vinserti64x2 $0xab, %xmm21, %ymm25, %ymm19 + +// CHECK: vinserti64x2 $171, %xmm21, %ymm25, %ymm19 {%k6} +// CHECK: encoding: [0x62,0xa3,0xb5,0x26,0x38,0xdd,0xab] + vinserti64x2 $0xab, %xmm21, %ymm25, %ymm19 {%k6} + +// CHECK: vinserti64x2 $171, %xmm21, %ymm25, %ymm19 {%k6} {z} +// CHECK: encoding: [0x62,0xa3,0xb5,0xa6,0x38,0xdd,0xab] + vinserti64x2 $0xab, %xmm21, %ymm25, %ymm19 {%k6} {z} + +// CHECK: vinserti64x2 $123, %xmm21, %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xa3,0xb5,0x20,0x38,0xdd,0x7b] + vinserti64x2 $0x7b, %xmm21, %ymm25, %ymm19 + +// CHECK: vinserti64x2 $123, (%rcx), %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xe3,0xb5,0x20,0x38,0x19,0x7b] + vinserti64x2 $0x7b,(%rcx), %ymm25, %ymm19 + +// CHECK: vinserti64x2 $123, 291(%rax,%r14,8), %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xa3,0xb5,0x20,0x38,0x9c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinserti64x2 $0x7b,291(%rax,%r14,8), %ymm25, %ymm19 + +// CHECK: vinserti64x2 $123, 2032(%rdx), %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xe3,0xb5,0x20,0x38,0x5a,0x7f,0x7b] + vinserti64x2 $0x7b,2032(%rdx), %ymm25, %ymm19 + +// CHECK: vinserti64x2 $123, 2048(%rdx), %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xe3,0xb5,0x20,0x38,0x9a,0x00,0x08,0x00,0x00,0x7b] + vinserti64x2 $0x7b,2048(%rdx), %ymm25, %ymm19 + +// CHECK: vinserti64x2 $123, -2048(%rdx), %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xe3,0xb5,0x20,0x38,0x5a,0x80,0x7b] + vinserti64x2 $0x7b,-2048(%rdx), %ymm25, %ymm19 + +// CHECK: vinserti64x2 $123, -2064(%rdx), %ymm25, %ymm19 +// CHECK: encoding: [0x62,0xe3,0xb5,0x20,0x38,0x9a,0xf0,0xf7,0xff,0xff,0x7b] + vinserti64x2 $0x7b,-2064(%rdx), %ymm25, %ymm19 + +// CHECK: vinserti64x2 $171, %xmm25, %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x03,0xbd,0x20,0x38,0xe9,0xab] + vinserti64x2 $0xab, %xmm25, %ymm24, %ymm29 + +// CHECK: vinserti64x2 $171, %xmm25, %ymm24, %ymm29 {%k2} +// CHECK: encoding: [0x62,0x03,0xbd,0x22,0x38,0xe9,0xab] + vinserti64x2 $0xab, %xmm25, %ymm24, %ymm29 {%k2} + +// CHECK: vinserti64x2 $171, %xmm25, %ymm24, %ymm29 {%k2} {z} +// CHECK: encoding: [0x62,0x03,0xbd,0xa2,0x38,0xe9,0xab] + vinserti64x2 $0xab, %xmm25, %ymm24, %ymm29 {%k2} {z} + +// CHECK: vinserti64x2 $123, %xmm25, %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x03,0xbd,0x20,0x38,0xe9,0x7b] + vinserti64x2 $0x7b, %xmm25, %ymm24, %ymm29 + +// CHECK: vinserti64x2 $123, (%rcx), %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x63,0xbd,0x20,0x38,0x29,0x7b] + vinserti64x2 $0x7b,(%rcx), %ymm24, %ymm29 + +// CHECK: vinserti64x2 $123, 4660(%rax,%r14,8), %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x23,0xbd,0x20,0x38,0xac,0xf0,0x34,0x12,0x00,0x00,0x7b] + vinserti64x2 $0x7b,4660(%rax,%r14,8), %ymm24, %ymm29 + +// CHECK: vinserti64x2 $123, 2032(%rdx), %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x63,0xbd,0x20,0x38,0x6a,0x7f,0x7b] + vinserti64x2 $0x7b,2032(%rdx), %ymm24, %ymm29 + +// CHECK: vinserti64x2 $123, 2048(%rdx), %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x63,0xbd,0x20,0x38,0xaa,0x00,0x08,0x00,0x00,0x7b] + vinserti64x2 $0x7b,2048(%rdx), %ymm24, %ymm29 + +// CHECK: vinserti64x2 $123, -2048(%rdx), %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x63,0xbd,0x20,0x38,0x6a,0x80,0x7b] + vinserti64x2 $0x7b,-2048(%rdx), %ymm24, %ymm29 + +// CHECK: vinserti64x2 $123, -2064(%rdx), %ymm24, %ymm29 +// CHECK: encoding: [0x62,0x63,0xbd,0x20,0x38,0xaa,0xf0,0xf7,0xff,0xff,0x7b] + vinserti64x2 $0x7b,-2064(%rdx), %ymm24, %ymm29 + Index: test/MC/X86/x86-64-avx512f_vl.s =================================================================== --- test/MC/X86/x86-64-avx512f_vl.s +++ test/MC/X86/x86-64-avx512f_vl.s @@ -19739,3 +19739,83 @@ // CHECK: encoding: [0x62,0xe1,0xe5,0x30,0x6d,0xa2,0xf8,0xfb,0xff,0xff] vpunpckhqdq -1032(%rdx){1to4}, %ymm19, %ymm20 +// CHECK: vinsertf32x4 $171, %xmm27, %ymm18, %ymm18 +// CHECK: encoding: [0x62,0x83,0x6d,0x20,0x18,0xd3,0xab] + vinsertf32x4 $0xab, %xmm27, %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $171, %xmm27, %ymm18, %ymm18 {%k7} +// CHECK: encoding: [0x62,0x83,0x6d,0x27,0x18,0xd3,0xab] + vinsertf32x4 $0xab, %xmm27, %ymm18, %ymm18 {%k7} + +// CHECK: vinsertf32x4 $171, %xmm27, %ymm18, %ymm18 {%k7} {z} +// CHECK: encoding: [0x62,0x83,0x6d,0xa7,0x18,0xd3,0xab] + vinsertf32x4 $0xab, %xmm27, %ymm18, %ymm18 {%k7} {z} + +// CHECK: vinsertf32x4 $123, %xmm27, %ymm18, %ymm18 +// CHECK: encoding: [0x62,0x83,0x6d,0x20,0x18,0xd3,0x7b] + vinsertf32x4 $0x7b, %xmm27, %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $123, (%rcx), %ymm18, %ymm18 +// CHECK: encoding: [0x62,0xe3,0x6d,0x20,0x18,0x11,0x7b] + vinsertf32x4 $0x7b, (%rcx), %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $123, 291(%rax,%r14,8), %ymm18, %ymm18 +// CHECK: encoding: [0x62,0xa3,0x6d,0x20,0x18,0x94,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinsertf32x4 $0x7b, 291(%rax,%r14,8), %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $123, 2032(%rdx), %ymm18, %ymm18 +// CHECK: encoding: [0x62,0xe3,0x6d,0x20,0x18,0x52,0x7f,0x7b] + vinsertf32x4 $0x7b, 2032(%rdx), %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $123, 2048(%rdx), %ymm18, %ymm18 +// CHECK: encoding: [0x62,0xe3,0x6d,0x20,0x18,0x92,0x00,0x08,0x00,0x00,0x7b] + vinsertf32x4 $0x7b, 2048(%rdx), %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $123, -2048(%rdx), %ymm18, %ymm18 +// CHECK: encoding: [0x62,0xe3,0x6d,0x20,0x18,0x52,0x80,0x7b] + vinsertf32x4 $0x7b, -2048(%rdx), %ymm18, %ymm18 + +// CHECK: vinsertf32x4 $123, -2064(%rdx), %ymm18, %ymm18 +// CHECK: encoding: [0x62,0xe3,0x6d,0x20,0x18,0x92,0xf0,0xf7,0xff,0xff,0x7b] + vinsertf32x4 $0x7b, -2064(%rdx), %ymm18, %ymm18 + +// CHECK: vinserti32x4 $171, %xmm24, %ymm28, %ymm17 +// CHECK: encoding: [0x62,0x83,0x1d,0x20,0x38,0xc8,0xab] + vinserti32x4 $0xab, %xmm24, %ymm28, %ymm17 + +// CHECK: vinserti32x4 $171, %xmm24, %ymm28, %ymm17 {%k3} +// CHECK: encoding: [0x62,0x83,0x1d,0x23,0x38,0xc8,0xab] + vinserti32x4 $0xab, %xmm24, %ymm28, %ymm17 {%k3} + +// CHECK: vinserti32x4 $171, %xmm24, %ymm28, %ymm17 {%k3} {z} +// CHECK: encoding: [0x62,0x83,0x1d,0xa3,0x38,0xc8,0xab] + vinserti32x4 $0xab, %xmm24, %ymm28, %ymm17 {%k3} {z} + +// CHECK: vinserti32x4 $123, %xmm24, %ymm28, %ymm17 +// CHECK: encoding: [0x62,0x83,0x1d,0x20,0x38,0xc8,0x7b] + vinserti32x4 $0x7b, %xmm24, %ymm28, %ymm17 + +// CHECK: vinserti32x4 $123, (%rcx), %ymm28, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x1d,0x20,0x38,0x09,0x7b] + vinserti32x4 $0x7b, (%rcx), %ymm28, %ymm17 + +// CHECK: vinserti32x4 $123, 291(%rax,%r14,8), %ymm28, %ymm17 +// CHECK: encoding: [0x62,0xa3,0x1d,0x20,0x38,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vinserti32x4 $0x7b, 291(%rax,%r14,8), %ymm28, %ymm17 + +// CHECK: vinserti32x4 $123, 2032(%rdx), %ymm28, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x1d,0x20,0x38,0x4a,0x7f,0x7b] + vinserti32x4 $0x7b, 2032(%rdx), %ymm28, %ymm17 + +// CHECK: vinserti32x4 $123, 2048(%rdx), %ymm28, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x1d,0x20,0x38,0x8a,0x00,0x08,0x00,0x00,0x7b] + vinserti32x4 $0x7b, 2048(%rdx), %ymm28, %ymm17 + +// CHECK: vinserti32x4 $123, -2048(%rdx), %ymm28, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x1d,0x20,0x38,0x4a,0x80,0x7b] + vinserti32x4 $0x7b, -2048(%rdx), %ymm28, %ymm17 + +// CHECK: vinserti32x4 $123, -2064(%rdx), %ymm28, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x1d,0x20,0x38,0x8a,0xf0,0xf7,0xff,0xff,0x7b] + vinserti32x4 $0x7b, -2064(%rdx), %ymm28, %ymm17 +