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