1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+enqcmd | FileCheck %s --check-prefix=X64
3 ; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+enqcmd | FileCheck %s --check-prefix=X86
4 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -mattr=+enqcmd | FileCheck %s --check-prefix=X32
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+enqcmd,+egpr --show-mc-encoding | FileCheck %s --check-prefix=EGPR
7 define i8 @test_enqcmd(ptr %dst, ptr %src) {
8 ; X64-LABEL: test_enqcmd:
9 ; X64: # %bb.0: # %entry
10 ; X64-NEXT: enqcmd (%rsi), %rdi
14 ; X86-LABEL: test_enqcmd:
15 ; X86: # %bb.0: # %entry
16 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
17 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
18 ; X86-NEXT: enqcmd (%eax), %ecx
22 ; X32-LABEL: test_enqcmd:
23 ; X32: # %bb.0: # %entry
24 ; X32-NEXT: enqcmd (%esi), %edi
28 ; EGPR-LABEL: test_enqcmd:
29 ; EGPR: # %bb.0: # %entry
30 ; EGPR-NEXT: enqcmd (%rsi), %rdi # EVEX TO LEGACY Compression encoding: [0xf2,0x0f,0x38,0xf8,0x3e]
31 ; EGPR-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
32 ; EGPR-NEXT: retq # encoding: [0xc3]
36 %0 = call i8 @llvm.x86.enqcmd(ptr %dst, ptr %src)
40 define i8 @test_enqcmds(ptr %dst, ptr %src) {
41 ; X64-LABEL: test_enqcmds:
42 ; X64: # %bb.0: # %entry
43 ; X64-NEXT: enqcmds (%rsi), %rdi
47 ; X86-LABEL: test_enqcmds:
48 ; X86: # %bb.0: # %entry
49 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
50 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
51 ; X86-NEXT: enqcmds (%eax), %ecx
55 ; X32-LABEL: test_enqcmds:
56 ; X32: # %bb.0: # %entry
57 ; X32-NEXT: enqcmds (%esi), %edi
61 ; EGPR-LABEL: test_enqcmds:
62 ; EGPR: # %bb.0: # %entry
63 ; EGPR-NEXT: enqcmds (%rsi), %rdi # EVEX TO LEGACY Compression encoding: [0xf3,0x0f,0x38,0xf8,0x3e]
64 ; EGPR-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
65 ; EGPR-NEXT: retq # encoding: [0xc3]
69 %0 = call i8 @llvm.x86.enqcmds(ptr %dst, ptr %src)
73 declare i8 @llvm.x86.enqcmd(ptr, ptr)
74 declare i8 @llvm.x86.enqcmds(ptr, ptr)