xref: /llvm-project/llvm/test/Transforms/OpenMP/add_attributes_amdgcn.ll (revision 2c2c9688f01799f17627ad10f7cfa544b8208c72)
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
3
4target triple = "amdgcn-amd-amdhsa"
5
6define void @call_all(i64 %arg) {
7  call void @__kmpc_syncwarp(i64 %arg)
8  call i64 @__kmpc_warp_active_thread_mask()
9  ret void
10}
11
12declare i64 @__kmpc_warp_active_thread_mask()
13
14declare void @__kmpc_syncwarp(i64)
15
16; CHECK: ; Function Attrs: convergent nounwind
17; CHECK-NEXT: declare i64 @__kmpc_warp_active_thread_mask()
18
19; CHECK: ; Function Attrs: convergent nounwind
20; CHECK-NEXT: declare void @__kmpc_syncwarp(i64)
21
22; OPTIMISTIC: ; Function Attrs: convergent nounwind
23; OPTIMISTIC-NEXT: declare i64 @__kmpc_warp_active_thread_mask()
24
25; OPTIMISTIC: ; Function Attrs: convergent nounwind
26; OPTIMISTIC-NEXT: declare void @__kmpc_syncwarp(i64)
27
28!llvm.module.flags = !{!0}
29
30!0 = !{i32 7, !"openmp", i32 50}
31