1 ; RUN: opt < %s -S -openmp-opt-cgscc | FileCheck %s
2 ; RUN: opt < %s -S -passes=openmp-opt-cgscc | FileCheck %s
3 ; RUN: opt < %s -S -openmp-opt-cgscc -openmp-ir-builder-optimistic-attributes | FileCheck %s --check-prefix=OPTIMISTIC
4 ; RUN: opt < %s -S -passes=openmp-opt-cgscc -openmp-ir-builder-optimistic-attributes | FileCheck %s --check-prefix=OPTIMISTIC
6 target triple = "amdgcn-amd-amdhsa"
8 define void @call_all(i64 %arg) {
9 call void @__kmpc_syncwarp(i64 %arg)
10 call i64 @__kmpc_warp_active_thread_mask()
14 declare i64 @__kmpc_warp_active_thread_mask()
16 declare void @__kmpc_syncwarp(i64)
18 ; CHECK: ; Function Attrs: convergent nounwind
19 ; CHECK-NEXT: declare i64 @__kmpc_warp_active_thread_mask()
21 ; CHECK: ; Function Attrs: convergent nounwind
22 ; CHECK-NEXT: declare void @__kmpc_syncwarp(i64)
24 ; OPTIMISTIC: ; Function Attrs: convergent nounwind
25 ; OPTIMISTIC-NEXT: declare i64 @__kmpc_warp_active_thread_mask()
27 ; OPTIMISTIC: ; Function Attrs: convergent nounwind
28 ; OPTIMISTIC-NEXT: declare void @__kmpc_syncwarp(i64)
30 !llvm.module.flags = !{!0}
32 !0 = !{i32 7, !"openmp", i32 50}