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