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 6 7define i8 @test_enqcmd(ptr %dst, ptr %src) { 8; X64-LABEL: test_enqcmd: 9; X64: # %bb.0: # %entry 10; X64-NEXT: enqcmd (%rsi), %rdi 11; X64-NEXT: sete %al 12; X64-NEXT: retq 13; 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 19; X86-NEXT: sete %al 20; X86-NEXT: retl 21; 22; X32-LABEL: test_enqcmd: 23; X32: # %bb.0: # %entry 24; X32-NEXT: enqcmd (%esi), %edi 25; X32-NEXT: sete %al 26; X32-NEXT: retq 27; 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] 33entry: 34 35 36 %0 = call i8 @llvm.x86.enqcmd(ptr %dst, ptr %src) 37 ret i8 %0 38} 39 40define i8 @test_enqcmds(ptr %dst, ptr %src) { 41; X64-LABEL: test_enqcmds: 42; X64: # %bb.0: # %entry 43; X64-NEXT: enqcmds (%rsi), %rdi 44; X64-NEXT: sete %al 45; X64-NEXT: retq 46; 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 52; X86-NEXT: sete %al 53; X86-NEXT: retl 54; 55; X32-LABEL: test_enqcmds: 56; X32: # %bb.0: # %entry 57; X32-NEXT: enqcmds (%esi), %edi 58; X32-NEXT: sete %al 59; X32-NEXT: retq 60; 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] 66entry: 67 68 69 %0 = call i8 @llvm.x86.enqcmds(ptr %dst, ptr %src) 70 ret i8 %0 71} 72 73declare i8 @llvm.x86.enqcmd(ptr, ptr) 74declare i8 @llvm.x86.enqcmds(ptr, ptr) 75