# Check x86-64 AVX2 instructions

	.text
_start:

# Tests for op mem256, mask,  ymm
# Tests for op ymm, mask, mem256
	vpmaskmovd (%rcx),%ymm4,%ymm6
	vpmaskmovd %ymm4,%ymm6,(%rcx)
	vpmaskmovq (%rcx),%ymm4,%ymm6
	vpmaskmovq %ymm4,%ymm6,(%rcx)

# Tests for op imm8, ymm/mem256, ymm
	vpermpd $7,%ymm6,%ymm2
	vpermpd $7,(%rcx),%ymm6
	vpermq $7,%ymm6,%ymm2
	vpermq $7,(%rcx),%ymm6

# Tests for op ymm/mem256, ymm, ymm
	vpermd %ymm4,%ymm6,%ymm2
	vpermd (%rcx),%ymm6,%ymm2
	vpermps %ymm4,%ymm6,%ymm2
	vpermps (%rcx),%ymm6,%ymm2
	vpsllvd %ymm4,%ymm6,%ymm2
	vpsllvd (%rcx),%ymm6,%ymm2
	vpsllvq %ymm4,%ymm6,%ymm2
	vpsllvq (%rcx),%ymm6,%ymm2
	vpsravd %ymm4,%ymm6,%ymm2
	vpsravd (%rcx),%ymm6,%ymm2
	vpsrlvd %ymm4,%ymm6,%ymm2
	vpsrlvd (%rcx),%ymm6,%ymm2
	vpsrlvq %ymm4,%ymm6,%ymm2
	vpsrlvq (%rcx),%ymm6,%ymm2

# Tests for op mem256, ymm
	vmovntdqa (%rcx),%ymm4

# Tests for op ymm, xmm
	vbroadcastsd %xmm4,%ymm6
	vbroadcastss %xmm4,%ymm6

# Tests for op imm8, ymm/mem256, ymm, ymm
	vpblendd $7,%ymm4,%ymm6,%ymm2
	vpblendd $7,(%rcx),%ymm6,%ymm2
	vperm2i128 $7,%ymm4,%ymm6,%ymm2
	vperm2i128 $7,(%rcx),%ymm6,%ymm2

# Tests for op imm8, xmm/mem128, ymm, ymm
	vinserti128 $7,%xmm4,%ymm4,%ymm6
	vinserti128 $7,(%rcx),%ymm4,%ymm6

# Tests for op mem128, ymm
	vbroadcasti128 (%rcx),%ymm4

# Tests for op xmm/mem128, xmm, xmm
	vpsllvd %xmm4,%xmm6,%xmm2
	vpsllvd (%rcx),%xmm6,%xmm7
	vpsllvq %xmm4,%xmm6,%xmm2
	vpsllvq (%rcx),%xmm6,%xmm7
	vpsravd %xmm4,%xmm6,%xmm2
	vpsravd (%rcx),%xmm6,%xmm7
	vpsrlvd %xmm4,%xmm6,%xmm2
	vpsrlvd (%rcx),%xmm6,%xmm7
	vpsrlvq %xmm4,%xmm6,%xmm2
	vpsrlvq (%rcx),%xmm6,%xmm7

# Tests for op mem128, xmm, xmm
	vpmaskmovd (%rcx),%xmm4,%xmm6
	vpmaskmovq (%rcx),%xmm4,%xmm6

# Tests for op imm8, ymm, xmm128/mem
	vextracti128 $7,%ymm4,%xmm6
	vextracti128 $7,%ymm4,(%rcx)

# Tests for op xmm, xmm, mem128
	vpmaskmovd %xmm4,%xmm6,(%rcx)
	vpmaskmovq %xmm4,%xmm6,(%rcx)

# Tests for op imm8, xmm/mem128, xmm, xmm
	vpblendd $7,%xmm4,%xmm6,%xmm2
	vpblendd $7,(%rcx),%xmm6,%xmm2

# Tests for op xmm/mem64, xmm
	vpbroadcastq %xmm4,%xmm6
	vpbroadcastq (%rcx),%xmm4

# Tests for op xmm/mem64, ymm
	vpbroadcastq %xmm4,%ymm6
	vpbroadcastq (%rcx),%ymm4

# Tests for op xmm/mem32, ymm
	vpbroadcastd %xmm4,%ymm4
	vpbroadcastd (%rcx),%ymm4

# Tests for op xmm/mem32, xmm
	vpbroadcastd %xmm4,%xmm6
	vpbroadcastd (%rcx),%xmm4

# Tests for op xmm/m16, xmm
	vpbroadcastw %xmm4,%xmm6
	vpbroadcastw (%rcx),%xmm4

# Tests for op xmm/m16, ymm
	vpbroadcastw %xmm4,%ymm6
	vpbroadcastw (%rcx),%ymm4

# Tests for op xmm/m8, xmm
	vpbroadcastb %xmm4,%xmm6
	vpbroadcastb (%rcx),%xmm4

# Tests for op xmm/m8, ymm
	vpbroadcastb %xmm4,%ymm6
	vpbroadcastb (%rcx),%ymm4

# Tests for op xmm, xmm
	vbroadcastss %xmm4,%xmm6

	.intel_syntax noprefix

# Tests for op mem256, mask,  ymm
# Tests for op ymm, mask, mem256
	vpmaskmovd ymm6,ymm4,YMMWORD PTR [rcx]
	vpmaskmovd YMMWORD PTR [rcx],ymm6,ymm4
	vpmaskmovd ymm6,ymm4,[rcx]
	vpmaskmovd [rcx],ymm6,ymm4
	vpmaskmovq ymm6,ymm4,YMMWORD PTR [rcx]
	vpmaskmovq YMMWORD PTR [rcx],ymm6,ymm4
	vpmaskmovq ymm6,ymm4,[rcx]
	vpmaskmovq [rcx],ymm6,ymm4

# Tests for op imm8, ymm/mem256, ymm
	vpermpd ymm2,ymm6,7
	vpermpd ymm6,YMMWORD PTR [rcx],7
	vpermpd ymm6,[rcx],7
	vpermq ymm2,ymm6,7
	vpermq ymm6,YMMWORD PTR [rcx],7
	vpermq ymm6,[rcx],7

# Tests for op ymm/mem256, ymm, ymm
	vpermd ymm2,ymm6,ymm4
	vpermd ymm2,ymm6,YMMWORD PTR [rcx]
	vpermd ymm2,ymm6,[rcx]
	vpermps ymm2,ymm6,ymm4
	vpermps ymm2,ymm6,YMMWORD PTR [rcx]
	vpermps ymm2,ymm6,[rcx]
	vpsllvd ymm2,ymm6,ymm4
	vpsllvd ymm2,ymm6,YMMWORD PTR [rcx]
	vpsllvd ymm2,ymm6,[rcx]
	vpsllvq ymm2,ymm6,ymm4
	vpsllvq ymm2,ymm6,YMMWORD PTR [rcx]
	vpsllvq ymm2,ymm6,[rcx]
	vpsravd ymm2,ymm6,ymm4
	vpsravd ymm2,ymm6,YMMWORD PTR [rcx]
	vpsravd ymm2,ymm6,[rcx]
	vpsrlvd ymm2,ymm6,ymm4
	vpsrlvd ymm2,ymm6,YMMWORD PTR [rcx]
	vpsrlvd ymm2,ymm6,[rcx]
	vpsrlvq ymm2,ymm6,ymm4
	vpsrlvq ymm2,ymm6,YMMWORD PTR [rcx]
	vpsrlvq ymm2,ymm6,[rcx]

# Tests for op mem256, ymm
	vmovntdqa ymm4,YMMWORD PTR [rcx]
	vmovntdqa ymm4,[rcx]

# Tests for op ymm, xmm
	vbroadcastsd ymm6,xmm4
	vbroadcastss ymm6,xmm4

# Tests for op imm8, ymm/mem256, ymm, ymm
	vpblendd ymm2,ymm6,ymm4,7
	vpblendd ymm2,ymm6,YMMWORD PTR [rcx],7
	vpblendd ymm2,ymm6,[rcx],7
	vperm2i128 ymm2,ymm6,ymm4,7
	vperm2i128 ymm2,ymm6,YMMWORD PTR [rcx],7
	vperm2i128 ymm2,ymm6,[rcx],7

# Tests for op imm8, xmm/mem128, ymm, ymm
	vinserti128 ymm6,ymm4,xmm4,7
	vinserti128 ymm6,ymm4,XMMWORD PTR [rcx],7
	vinserti128 ymm6,ymm4,[rcx],7

# Tests for op mem128, ymm
	vbroadcasti128 ymm4,XMMWORD PTR [rcx]
	vbroadcasti128 ymm4,[rcx]

# Tests for op xmm/mem128, xmm, xmm
	vpsllvd xmm2,xmm6,xmm4
	vpsllvd xmm7,xmm6,XMMWORD PTR [rcx]
	vpsllvd xmm7,xmm6,[rcx]
	vpsllvq xmm2,xmm6,xmm4
	vpsllvq xmm7,xmm6,XMMWORD PTR [rcx]
	vpsllvq xmm7,xmm6,[rcx]
	vpsravd xmm2,xmm6,xmm4
	vpsravd xmm7,xmm6,XMMWORD PTR [rcx]
	vpsravd xmm7,xmm6,[rcx]
	vpsrlvd xmm2,xmm6,xmm4
	vpsrlvd xmm7,xmm6,XMMWORD PTR [rcx]
	vpsrlvd xmm7,xmm6,[rcx]
	vpsrlvq xmm2,xmm6,xmm4
	vpsrlvq xmm7,xmm6,XMMWORD PTR [rcx]
	vpsrlvq xmm7,xmm6,[rcx]

# Tests for op mem128, xmm, xmm
	vpmaskmovd xmm6,xmm4,XMMWORD PTR [rcx]
	vpmaskmovd xmm6,xmm4,[rcx]
	vpmaskmovq xmm6,xmm4,XMMWORD PTR [rcx]
	vpmaskmovq xmm6,xmm4,[rcx]

# Tests for op imm8, ymm, xmm128/mem
	vextracti128 xmm6,ymm4,7
	vextracti128 XMMWORD PTR [rcx],ymm4,7
	vextracti128 [rcx],ymm4,7

# Tests for op xmm, xmm, mem128
	vpmaskmovd XMMWORD PTR [rcx],xmm6,xmm4
	vpmaskmovd [rcx],xmm6,xmm4
	vpmaskmovq XMMWORD PTR [rcx],xmm6,xmm4
	vpmaskmovq [rcx],xmm6,xmm4

# Tests for op imm8, xmm/mem128, xmm, xmm
	vpblendd xmm2,xmm6,xmm4,7
	vpblendd xmm2,xmm6,XMMWORD PTR [rcx],7
	vpblendd xmm2,xmm6,[rcx],7

# Tests for op xmm/mem64, xmm
	vpbroadcastq xmm6,xmm4
	vpbroadcastq xmm4,QWORD PTR [rcx]
	vpbroadcastq xmm4,[rcx]

# Tests for op xmm/mem64, ymm
	vpbroadcastq ymm6,xmm4
	vpbroadcastq ymm4,QWORD PTR [rcx]
	vpbroadcastq ymm4,[rcx]

# Tests for op xmm/mem32, ymm
	vpbroadcastd ymm4,xmm4
	vpbroadcastd ymm4,DWORD PTR [rcx]
	vpbroadcastd ymm4,[rcx]

# Tests for op xmm/mem32, xmm
	vpbroadcastd xmm6,xmm4
	vpbroadcastd xmm4,DWORD PTR [rcx]
	vpbroadcastd xmm4,[rcx]

# Tests for op xmm/m16, xmm
	vpbroadcastw xmm6,xmm4
	vpbroadcastw xmm4,WORD PTR [rcx]
	vpbroadcastw xmm4,[rcx]

# Tests for op xmm/m16, ymm
	vpbroadcastw ymm6,xmm4
	vpbroadcastw ymm4,WORD PTR [rcx]
	vpbroadcastw ymm4,[rcx]

# Tests for op xmm/m8, xmm
	vpbroadcastb xmm6,xmm4
	vpbroadcastb xmm4,BYTE PTR [rcx]
	vpbroadcastb xmm4,[rcx]

# Tests for op xmm/m8, ymm
	vpbroadcastb ymm6,xmm4
	vpbroadcastb ymm4,BYTE PTR [rcx]
	vpbroadcastb ymm4,[rcx]

# Tests for op xmm, xmm
	vbroadcastss xmm6,xmm4
