forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AMDGPU: Mark ds append/consume intrinsics with align 4 (llvm#110533)
Manual says the low 2 bits of the pointer are ignored.
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; REQUIRES: amdgpu-registered-target | ||
|
||
; RUN: llvm-as < %s | llvm-dis | FileCheck %s | ||
|
||
; Test assumed alignment parameter | ||
|
||
; CHECK: declare i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) nocapture align 4, i1 immarg) #0 | ||
|
||
define i32 @ds_append(ptr addrspace(3) %ptr) { | ||
%ret = call i32 @llvm.amdgcn.ds.append.p3(ptr addrspace(3) %ptr, i1 false) | ||
ret i32 %ret | ||
} | ||
|
||
; Test assumed alignment parameter | ||
; CHECK: declare i32 @llvm.amdgcn.ds.consume.p3(ptr addrspace(3) nocapture align 4, i1 immarg) #0 | ||
define i32 @ds_consume(ptr addrspace(3) %ptr) { | ||
%ret = call i32 @llvm.amdgcn.ds.consume.p3(ptr addrspace(3) %ptr, i1 false) | ||
ret i32 %ret | ||
} | ||
|
||
; CHECK: attributes #0 = { convergent nocallback nofree nounwind willreturn memory(argmem: readwrite) } |