xref: /aosp_15_r20/external/clang/test/CodeGen/pku.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +pku -emit-llvm -o - -Werror | FileCheck %s
2 
3 // Don't include mm_malloc.h, it's system specific.
4 #define __MM_MALLOC_H
5 
6 #include <immintrin.h>
7 
test_rdpkru_u32()8 unsigned int test_rdpkru_u32() {
9   // CHECK-LABEL: @test_rdpkru_u32
10   // CHECK: @llvm.x86.rdpkru
11   return _rdpkru_u32();
12 }
test_wrpkru(unsigned int __A)13 void test_wrpkru(unsigned int __A) {
14   // CHECK-LABEL: @test_wrpkru
15   // CHECK: @llvm.x86.wrpkru
16   _wrpkru(__A);
17   return ;
18 }
19