1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+invpcid | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+invpcid | FileCheck %s --check-prefix=X86_64
5 define void @test_invpcid(i32 %type, i8* %descriptor) {
6 ; X86-LABEL: test_invpcid:
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
10 ; X86-NEXT: invpcid (%eax), %ecx
13 ; X86_64-LABEL: test_invpcid:
14 ; X86_64: # %bb.0: # %entry
15 ; X86_64-NEXT: movl %edi, %eax
16 ; X86_64-NEXT: invpcid (%rsi), %rax
19 call void @llvm.x86.invpcid(i32 %type, i8* %descriptor)
23 define void @test_invpcid2(i32* readonly %type, i8* %descriptor) {
24 ; X86-LABEL: test_invpcid2:
25 ; X86: # %bb.0: # %entry
26 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
27 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
28 ; X86-NEXT: movl (%ecx), %ecx
29 ; X86-NEXT: invpcid (%eax), %ecx
32 ; X86_64-LABEL: test_invpcid2:
33 ; X86_64: # %bb.0: # %entry
34 ; X86_64-NEXT: movl (%rdi), %eax
35 ; X86_64-NEXT: invpcid (%rsi), %rax
38 %0 = load i32, i32* %type, align 4
39 tail call void @llvm.x86.invpcid(i32 %0, i8* %descriptor) #1
43 declare void @llvm.x86.invpcid(i32, i8*)