Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenMP] Emit calls to int64_t functions for amdgcn
[OpenMP] Emit calls to int64_t functions for amdgcn Two functions, syncwarp and active_thread_mask, return lanemask_t. Currently this is assumed to be int32, which is true for nvptx. Patch makes the type target architecture dependent. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D89746
- Loading branch information
1 parent
b2faf75
commit 09bc755
Showing
5 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
; RUN: opt < %s -S -openmpopt | FileCheck %s | ||
; RUN: opt < %s -S -passes=openmpopt | FileCheck %s | ||
; RUN: opt < %s -S -openmpopt -openmp-ir-builder-optimistic-attributes | FileCheck %s --check-prefix=OPTIMISTIC | ||
; RUN: opt < %s -S -passes=openmpopt -openmp-ir-builder-optimistic-attributes | FileCheck %s --check-prefix=OPTIMISTIC | ||
|
||
target triple = "amdgcn-amd-amdhsa" | ||
|
||
define void @call_all(i64 %arg) { | ||
call void @__kmpc_syncwarp(i64 %arg) | ||
call i64 @__kmpc_warp_active_thread_mask() | ||
ret void | ||
} | ||
|
||
declare i64 @__kmpc_warp_active_thread_mask() | ||
|
||
declare void @__kmpc_syncwarp(i64) | ||
|
||
; CHECK: ; Function Attrs: convergent nounwind | ||
; CHECK-NEXT: declare i64 @__kmpc_warp_active_thread_mask() | ||
|
||
; CHECK: ; Function Attrs: convergent nounwind | ||
; CHECK-NEXT: declare void @__kmpc_syncwarp(i64) | ||
|
||
; OPTIMISTIC: ; Function Attrs: convergent nounwind | ||
; OPTIMISTIC-NEXT: declare i64 @__kmpc_warp_active_thread_mask() | ||
|
||
; OPTIMISTIC: ; Function Attrs: convergent nounwind | ||
; OPTIMISTIC-NEXT: declare void @__kmpc_syncwarp(i64) |