comparison clang/test/CodeGen/callback_openmp.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
1 // RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 %s -emit-llvm -o - | FileCheck %s 1 // RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp %s -emit-llvm -o - -disable-llvm-optzns | FileCheck %s
2 // RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 %s -emit-llvm -o - | opt -ipconstprop -S | FileCheck --check-prefix=IPCP %s
3 2
4 // CHECK: declare !callback ![[cid:[0-9]+]] void @__kmpc_fork_call 3 // CHECK: declare !callback ![[cid:[0-9]+]] void @__kmpc_fork_call
5 // CHECK: declare !callback ![[cid]] void @__kmpc_fork_teams 4 // CHECK: declare !callback ![[cid]] void @__kmpc_fork_teams
6 // CHECK: ![[cid]] = !{![[cidb:[0-9]+]]} 5 // CHECK: ![[cid]] = !{![[cidb:[0-9]+]]}
7 // CHECK: ![[cidb]] = !{i64 2, i64 -1, i64 -1, i1 true} 6 // CHECK: ![[cidb]] = !{i64 2, i64 -1, i64 -1, i1 true}
13 void foo(int q) { 12 void foo(int q) {
14 int p = 2; 13 int p = 2;
15 14
16 #pragma omp parallel firstprivate(q, p) 15 #pragma omp parallel firstprivate(q, p)
17 work1(p, q); 16 work1(p, q);
18 // IPCP: call void @work1(i32 2, i32 %{{[._a-zA-Z0-9]*}})
19 17
20 #pragma omp parallel for firstprivate(p, q) 18 #pragma omp parallel for firstprivate(p, q)
21 for (int i = 0; i < q; i++) 19 for (int i = 0; i < q; i++)
22 work2(i, p); 20 work2(i, p);
23 // IPCP: call void @work2(i32 %{{[._a-zA-Z0-9]*}}, i32 2)
24 21
25 #pragma omp target teams firstprivate(p) 22 #pragma omp target teams firstprivate(p)
26 work12(p, p); 23 work12(p, p);
27 // IPCP: call void @work12(i32 2, i32 2)
28 } 24 }