xref: /aosp_15_r20/external/clang/test/CodeGen/restrict.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -triple x86_64-darwin-apple -emit-llvm %s -o - | FileCheck %s
2*67e74705SXin Li 
3*67e74705SXin Li // PR6695
4*67e74705SXin Li 
5*67e74705SXin Li // CHECK: define void @test0(i32* %{{.*}}, i32 %{{.*}})
test0(int * x,int y)6*67e74705SXin Li void test0(int *x, int y) {
7*67e74705SXin Li }
8*67e74705SXin Li 
9*67e74705SXin Li // CHECK: define void @test1(i32* noalias %{{.*}}, i32 %{{.*}})
test1(int * restrict x,int y)10*67e74705SXin Li void test1(int * restrict x, int y) {
11*67e74705SXin Li }
12*67e74705SXin Li 
13*67e74705SXin Li // CHECK: define void @test2(i32* %{{.*}}, i32* noalias %{{.*}})
test2(int * x,int * restrict y)14*67e74705SXin Li void test2(int *x, int * restrict y) {
15*67e74705SXin Li }
16*67e74705SXin Li 
17*67e74705SXin Li typedef int * restrict rp;
18*67e74705SXin Li 
19*67e74705SXin Li // CHECK: define void @test3(i32* noalias %{{.*}}, i32 %{{.*}})
test3(rp x,int y)20*67e74705SXin Li void test3(rp x, int y) {
21*67e74705SXin Li }
22*67e74705SXin Li 
23*67e74705SXin Li // CHECK: define void @test4(i32* %{{.*}}, i32* noalias %{{.*}})
test4(int * x,rp y)24*67e74705SXin Li void test4(int *x, rp y) {
25*67e74705SXin Li }
26*67e74705SXin Li 
27