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 4 5define 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 11; X86-NEXT: retl 12; 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 17; X86_64-NEXT: retq 18entry: 19 call void @llvm.x86.invpcid(i32 %type, i8* %descriptor) 20 ret void 21} 22 23define 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 30; X86-NEXT: retl 31; 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 36; X86_64-NEXT: retq 37entry: 38 %0 = load i32, i32* %type, align 4 39 tail call void @llvm.x86.invpcid(i32 %0, i8* %descriptor) #1 40 ret void 41} 42 43declare void @llvm.x86.invpcid(i32, i8*) 44