// RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s

// CHECK: vsm4key4 %ymm4, %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x16,0xda,0xe4]
          vsm4key4 %ymm4, %ymm13, %ymm12

// CHECK: vsm4key4 %xmm4, %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x12,0xda,0xe4]
          vsm4key4 %xmm4, %xmm13, %xmm12

// CHECK: vsm4key4  268435456(%rbp,%r14,8), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x22,0x16,0xda,0xa4,0xf5,0x00,0x00,0x00,0x10]
          vsm4key4  268435456(%rbp,%r14,8), %ymm13, %ymm12

// CHECK: vsm4key4  291(%r8,%rax,4), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x42,0x16,0xda,0xa4,0x80,0x23,0x01,0x00,0x00]
          vsm4key4  291(%r8,%rax,4), %ymm13, %ymm12

// CHECK: vsm4key4  (%rip), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x16,0xda,0x25,0x00,0x00,0x00,0x00]
          vsm4key4  (%rip), %ymm13, %ymm12

// CHECK: vsm4key4  -1024(,%rbp,2), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x16,0xda,0x24,0x6d,0x00,0xfc,0xff,0xff]
          vsm4key4  -1024(,%rbp,2), %ymm13, %ymm12

// CHECK: vsm4key4  4064(%rcx), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x16,0xda,0xa1,0xe0,0x0f,0x00,0x00]
          vsm4key4  4064(%rcx), %ymm13, %ymm12

// CHECK: vsm4key4  -4096(%rdx), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x16,0xda,0xa2,0x00,0xf0,0xff,0xff]
          vsm4key4  -4096(%rdx), %ymm13, %ymm12

// CHECK: vsm4key4  268435456(%rbp,%r14,8), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x22,0x12,0xda,0xa4,0xf5,0x00,0x00,0x00,0x10]
          vsm4key4  268435456(%rbp,%r14,8), %xmm13, %xmm12

// CHECK: vsm4key4  291(%r8,%rax,4), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x42,0x12,0xda,0xa4,0x80,0x23,0x01,0x00,0x00]
          vsm4key4  291(%r8,%rax,4), %xmm13, %xmm12

// CHECK: vsm4key4  (%rip), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x12,0xda,0x25,0x00,0x00,0x00,0x00]
          vsm4key4  (%rip), %xmm13, %xmm12

// CHECK: vsm4key4  -512(,%rbp,2), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x12,0xda,0x24,0x6d,0x00,0xfe,0xff,0xff]
          vsm4key4  -512(,%rbp,2), %xmm13, %xmm12

// CHECK: vsm4key4  2032(%rcx), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x12,0xda,0xa1,0xf0,0x07,0x00,0x00]
          vsm4key4  2032(%rcx), %xmm13, %xmm12

// CHECK: vsm4key4  -2048(%rdx), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x12,0xda,0xa2,0x00,0xf8,0xff,0xff]
          vsm4key4  -2048(%rdx), %xmm13, %xmm12

// CHECK: vsm4rnds4 %ymm4, %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x17,0xda,0xe4]
          vsm4rnds4 %ymm4, %ymm13, %ymm12

// CHECK: vsm4rnds4 %xmm4, %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x13,0xda,0xe4]
          vsm4rnds4 %xmm4, %xmm13, %xmm12

// CHECK: vsm4rnds4  268435456(%rbp,%r14,8), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x22,0x17,0xda,0xa4,0xf5,0x00,0x00,0x00,0x10]
          vsm4rnds4  268435456(%rbp,%r14,8), %ymm13, %ymm12

// CHECK: vsm4rnds4  291(%r8,%rax,4), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x42,0x17,0xda,0xa4,0x80,0x23,0x01,0x00,0x00]
          vsm4rnds4  291(%r8,%rax,4), %ymm13, %ymm12

// CHECK: vsm4rnds4  (%rip), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x17,0xda,0x25,0x00,0x00,0x00,0x00]
          vsm4rnds4  (%rip), %ymm13, %ymm12

// CHECK: vsm4rnds4  -1024(,%rbp,2), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x17,0xda,0x24,0x6d,0x00,0xfc,0xff,0xff]
          vsm4rnds4  -1024(,%rbp,2), %ymm13, %ymm12

// CHECK: vsm4rnds4  4064(%rcx), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x17,0xda,0xa1,0xe0,0x0f,0x00,0x00]
          vsm4rnds4  4064(%rcx), %ymm13, %ymm12

// CHECK: vsm4rnds4  -4096(%rdx), %ymm13, %ymm12
// CHECK: encoding: [0xc4,0x62,0x17,0xda,0xa2,0x00,0xf0,0xff,0xff]
          vsm4rnds4  -4096(%rdx), %ymm13, %ymm12

// CHECK: vsm4rnds4  268435456(%rbp,%r14,8), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x22,0x13,0xda,0xa4,0xf5,0x00,0x00,0x00,0x10]
          vsm4rnds4  268435456(%rbp,%r14,8), %xmm13, %xmm12

// CHECK: vsm4rnds4  291(%r8,%rax,4), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x42,0x13,0xda,0xa4,0x80,0x23,0x01,0x00,0x00]
          vsm4rnds4  291(%r8,%rax,4), %xmm13, %xmm12

// CHECK: vsm4rnds4  (%rip), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x13,0xda,0x25,0x00,0x00,0x00,0x00]
          vsm4rnds4  (%rip), %xmm13, %xmm12

// CHECK: vsm4rnds4  -512(,%rbp,2), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x13,0xda,0x24,0x6d,0x00,0xfe,0xff,0xff]
          vsm4rnds4  -512(,%rbp,2), %xmm13, %xmm12

// CHECK: vsm4rnds4  2032(%rcx), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x13,0xda,0xa1,0xf0,0x07,0x00,0x00]
          vsm4rnds4  2032(%rcx), %xmm13, %xmm12

// CHECK: vsm4rnds4  -2048(%rdx), %xmm13, %xmm12
// CHECK: encoding: [0xc4,0x62,0x13,0xda,0xa2,0x00,0xf8,0xff,0xff]
          vsm4rnds4  -2048(%rdx), %xmm13, %xmm12

