diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-14 10:32:29 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-14 10:32:29 +0000 |
| commit | b44fdfc7b242ad9ecbbeee1c2ceb55ffadd64832 (patch) | |
| tree | 486fa003ba5cbf3c4a4dc7c63201c92c25ddd7ae /clang/test/OpenMP/parallel_firstprivate_codegen.cpp | |
| parent | d9c0bcfd2844035a20806fc3959ef51dc018b879 (diff) | |
| download | bcm5719-llvm-b44fdfc7b242ad9ecbbeee1c2ceb55ffadd64832.tar.gz bcm5719-llvm-b44fdfc7b242ad9ecbbeee1c2ceb55ffadd64832.zip | |
[OPENMP] Drop type qualifiers from private variables.
If the variable is marked as private in OpenMP construct, the reference to this variable should not keep type qualifiers for the original variable. Private copy is not volatile or constant, so we can use unqualified type for private copy.
llvm-svn: 242133
Diffstat (limited to 'clang/test/OpenMP/parallel_firstprivate_codegen.cpp')
| -rw-r--r-- | clang/test/OpenMP/parallel_firstprivate_codegen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/OpenMP/parallel_firstprivate_codegen.cpp b/clang/test/OpenMP/parallel_firstprivate_codegen.cpp index 760b96171ab..6e0f014f4d9 100644 --- a/clang/test/OpenMP/parallel_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/parallel_firstprivate_codegen.cpp @@ -75,7 +75,7 @@ int main() { // LAMBDA: store i{{[0-9]+}} [[G_VAL]], i{{[0-9]+}}* [[G_PRIVATE_ADDR]] // LAMBDA: call {{.*}}i32 @__kmpc_cancel_barrier( g = 1; - // LAMBDA: store volatile i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]], + // LAMBDA: store i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]], // LAMBDA: [[G_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // LAMBDA: store i{{[0-9]+}}* [[G_PRIVATE_ADDR]], i{{[0-9]+}}** [[G_PRIVATE_ADDR_REF]] // LAMBDA: call{{.*}} void [[INNER_LAMBDA:@.+]](%{{.+}}* [[ARG]]) @@ -86,7 +86,7 @@ int main() { // LAMBDA: [[ARG_PTR:%.+]] = load %{{.+}}*, %{{.+}}** [[ARG_PTR_REF]] // LAMBDA: [[G_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // LAMBDA: [[G_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[G_PTR_REF]] - // LAMBDA: store volatile i{{[0-9]+}} 2, i{{[0-9]+}}* [[G_REF]] + // LAMBDA: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[G_REF]] }(); } }(); @@ -113,7 +113,7 @@ int main() { // BLOCKS: store i{{[0-9]+}} [[G_VAL]], i{{[0-9]+}}* [[G_PRIVATE_ADDR]] // BLOCKS: call {{.*}}i32 @__kmpc_cancel_barrier( g = 1; - // BLOCKS: store volatile i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]], + // BLOCKS: store i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]], // BLOCKS-NOT: [[G]]{{[[^:word:]]}} // BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]] // BLOCKS-NOT: [[G]]{{[[^:word:]]}} @@ -122,7 +122,7 @@ int main() { // BLOCKS: define {{.+}} void {{@.+}}(i8* g = 2; // BLOCKS-NOT: [[G]]{{[[^:word:]]}} - // BLOCKS: store volatile i{{[0-9]+}} 2, i{{[0-9]+}}* + // BLOCKS: store i{{[0-9]+}} 2, i{{[0-9]+}}* // BLOCKS-NOT: [[G]]{{[[^:word:]]}} // BLOCKS: ret }(); |

