# RUN: llvm-mc -triple x86_64 -show-encoding -x86-asm-syntax=intel -output-asm-variant=1 %s | FileCheck %s

# CHECK: {evex}	rcr	bl, 123
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc0,0xdb,0x7b]
         {evex}	rcr	bl, 123
# CHECK: rcr	bl, bl, 123
# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xc0,0xdb,0x7b]
         rcr	bl, bl, 123
# CHECK: {evex}	rcr	dx, 123
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xc1,0xda,0x7b]
         {evex}	rcr	dx, 123
# CHECK: rcr	dx, dx, 123
# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xc1,0xda,0x7b]
         rcr	dx, dx, 123
# CHECK: {evex}	rcr	ecx, 123
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc1,0xd9,0x7b]
         {evex}	rcr	ecx, 123
# CHECK: rcr	ecx, ecx, 123
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xc1,0xd9,0x7b]
         rcr	ecx, ecx, 123
# CHECK: {evex}	rcr	r9, 123
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xd9,0x7b]
         {evex}	rcr	r9, 123
# CHECK: rcr	r9, r9, 123
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xd9,0x7b]
         rcr	r9, r9, 123
# CHECK: {evex}	rcr	byte ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc0,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         {evex}	rcr	byte ptr [r8 + 4*rax + 291], 123
# CHECK: rcr	bl, byte ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xc0,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         rcr	bl, byte ptr [r8 + 4*rax + 291], 123
# CHECK: {evex}	rcr	word ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xc1,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         {evex}	rcr	word ptr [r8 + 4*rax + 291], 123
# CHECK: rcr	dx, word ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xc1,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         rcr	dx, word ptr [r8 + 4*rax + 291], 123
# CHECK: {evex}	rcr	dword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc1,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         {evex}	rcr	dword ptr [r8 + 4*rax + 291], 123
# CHECK: rcr	ecx, dword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xc1,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         rcr	ecx, dword ptr [r8 + 4*rax + 291], 123
# CHECK: {evex}	rcr	qword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         {evex}	rcr	qword ptr [r8 + 4*rax + 291], 123
# CHECK: rcr	r9, qword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
         rcr	r9, qword ptr [r8 + 4*rax + 291], 123
# CHECK: {evex}	rcr	bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd0,0xdb]
         {evex}	rcr	bl
# CHECK: {evex}	rcr	bl, cl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd2,0xdb]
         {evex}	rcr	bl, cl
# CHECK: rcr	bl, bl, cl
# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xd2,0xdb]
         rcr	bl, bl, cl
# CHECK: {evex}	rcr	dx, cl
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd3,0xda]
         {evex}	rcr	dx, cl
# CHECK: rcr	dx, dx, cl
# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd3,0xda]
         rcr	dx, dx, cl
# CHECK: {evex}	rcr	ecx, cl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd3,0xd9]
         {evex}	rcr	ecx, cl
# CHECK: rcr	ecx, ecx, cl
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd3,0xd9]
         rcr	ecx, ecx, cl
# CHECK: {evex}	rcr	r9, cl
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xd9]
         {evex}	rcr	r9, cl
# CHECK: rcr	r9, r9, cl
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xd9]
         rcr	r9, r9, cl
# CHECK: {evex}	rcr	byte ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd2,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	byte ptr [r8 + 4*rax + 291], cl
# CHECK: rcr	bl, byte ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd2,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	bl, byte ptr [r8 + 4*rax + 291], cl
# CHECK: {evex}	rcr	word ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd3,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	word ptr [r8 + 4*rax + 291], cl
# CHECK: rcr	dx, word ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd3,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	dx, word ptr [r8 + 4*rax + 291], cl
# CHECK: {evex}	rcr	dword ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd3,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	dword ptr [r8 + 4*rax + 291], cl
# CHECK: rcr	ecx, dword ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd3,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	ecx, dword ptr [r8 + 4*rax + 291], cl
# CHECK: {evex}	rcr	qword ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	qword ptr [r8 + 4*rax + 291], cl
# CHECK: rcr	r9, qword ptr [r8 + 4*rax + 291], cl
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	r9, qword ptr [r8 + 4*rax + 291], cl
# CHECK: {evex}	rcr	dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd1,0xda]
         {evex}	rcr	dx
# CHECK: rcr	dx, dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd1,0xda]
         rcr	dx, dx
# CHECK: {evex}	rcr	ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd1,0xd9]
         {evex}	rcr	ecx
# CHECK: rcr	ecx, ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd1,0xd9]
         rcr	ecx, ecx
# CHECK: {evex}	rcr	r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xd9]
         {evex}	rcr	r9
# CHECK: rcr	r9, r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xd9]
         rcr	r9, r9
# CHECK: {evex}	rcr	byte ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd0,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	byte ptr [r8 + 4*rax + 291]
# CHECK: rcr	bl, byte ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd0,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	bl, byte ptr [r8 + 4*rax + 291]
# CHECK: {evex}	rcr	word ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd1,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	word ptr [r8 + 4*rax + 291]
# CHECK: rcr	dx, word ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd1,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	dx, word ptr [r8 + 4*rax + 291]
# CHECK: {evex}	rcr	dword ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd1,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	dword ptr [r8 + 4*rax + 291]
# CHECK: rcr	ecx, dword ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd1,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	ecx, dword ptr [r8 + 4*rax + 291]
# CHECK: {evex}	rcr	qword ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0x9c,0x80,0x23,0x01,0x00,0x00]
         {evex}	rcr	qword ptr [r8 + 4*rax + 291]
# CHECK: rcr	r9, qword ptr [r8 + 4*rax + 291]
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0x9c,0x80,0x23,0x01,0x00,0x00]
         rcr	r9, qword ptr [r8 + 4*rax + 291]
