1 // RUN: %clang_cc1 %s -ffreestanding -triple x86_64-unknown-unknown -target-feature +uintr -emit-llvm -o - | FileCheck %s
2 
3 #include <x86gprintrin.h>
4 
test_clui()5 void test_clui() {
6 // CHECK-LABEL: @test_clui
7 // CHECK: call void @llvm.x86.clui()
8 // CHECK: ret
9   _clui();
10 }
11 
test_stui()12 void test_stui() {
13 // CHECK-LABEL: @test_stui
14 // CHECK: call void @llvm.x86.stui()
15 // CHECK: ret
16   _stui();
17 }
18 
test_testui()19 unsigned char test_testui() {
20 // CHECK-LABEL: @test_testui
21 // CHECK: %[[TMP0:.+]] = call i8 @llvm.x86.testui()
22 // CHECK: ret i8 %[[TMP0]]
23   return _testui();
24 }
25 
test_senduipi(unsigned long long a)26 void test_senduipi(unsigned long long a) {
27 // CHECK-LABEL: @test_senduipi
28 // CHECK: call void @llvm.x86.senduipi(i64 %{{.+}})
29 // CHECK: ret
30   _senduipi(a);
31 }
32