; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+amx-tile,+egpr --show-mc-encoding | FileCheck %s

define dso_local void @amx(ptr noundef %data) nounwind {
; CHECK-LABEL: amx:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    pushq %rbx # encoding: [0x53]
; CHECK-NEXT:    movq %rdi, %rbx # encoding: [0x48,0x89,0xfb]
; CHECK-NEXT:    #APP
; CHECK-NEXT:    nop # encoding: [0x90]
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    movl $8, %eax # encoding: [0xb8,0x08,0x00,0x00,0x00]
; CHECK-NEXT:    tileloadd (%rbx,%rax), %tmm4 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7b,0x4b,0x24,0x03]
; CHECK-NEXT:    popq %rbx # encoding: [0x5b]
; CHECK-NEXT:    retq # encoding: [0xc3]
entry:
  tail call void asm sideeffect "nop", "~{eax},~{ecx},~{edx},~{esi},~{edi},~{r8},~{r9},~{r10},~{r11}"()
  call void @llvm.x86.tileloadd64(i8 4, ptr %data, i64 8)
  ret void
}

declare void @llvm.x86.tileloadd64(i8 immarg, ptr, i64)
