From: Christopher Lamb Date: Sun, 29 Jul 2007 23:29:16 +0000 (+0000) Subject: Add tests for generating noalias parameter attribute from __restrict qualified functi... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=db9530599e0cdacbaea0b4a714742df0829cab5c;p=oota-llvm.git Add tests for generating noalias parameter attribute from __restrict qualified function parameters. C++ tests are currently XFAILing see PR1582. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40583 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp b/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp new file mode 100644 index 00000000000..e45eda07847 --- /dev/null +++ b/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp @@ -0,0 +1,8 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias +// XFAIL: i[1-9]86|alpha|ia64|arm|x86_64|amd64 +// NOTE: This should be un-XFAILed when the C++ type qualifiers are fixed + +void foo(int * __restrict myptr1, int * myptr2) { + myptr1[0] = 0; + myptr2[0] = 0; +} diff --git a/test/C++Frontend/2007-07-29-RestrictRefArg.cpp b/test/C++Frontend/2007-07-29-RestrictRefArg.cpp new file mode 100644 index 00000000000..e1b5cd60e11 --- /dev/null +++ b/test/C++Frontend/2007-07-29-RestrictRefArg.cpp @@ -0,0 +1,8 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias +// XFAIL: i[1-9]86|alpha|ia64|arm|x86_64|amd64 +// NOTE: This should be un-XFAILed when the C++ type qualifiers are fixed + +void foo(int & __restrict myptr1, int & myptr2) { + myptr1 = 0; + myptr2 = 0; +} diff --git a/test/CFrontend/2007-07-29-RestrictPtrArg.c b/test/CFrontend/2007-07-29-RestrictPtrArg.c new file mode 100644 index 00000000000..be09108b345 --- /dev/null +++ b/test/CFrontend/2007-07-29-RestrictPtrArg.c @@ -0,0 +1,6 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias + +void foo(int * __restrict myptr1, int * myptr2) { + myptr1[0] = 0; + myptr2[0] = 0; +} \ No newline at end of file