-
Notifications
You must be signed in to change notification settings - Fork 15k
[NFC][AMDGPU][GlobalISel] Test bufer_load/store of pointers (crashes) #110711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
krzysz00
wants to merge
1
commit into
llvm:main
from
krzysz00:buffer-load-pointer-gisel-crash-precommit
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-store-pointers.ll
This file contains hidden or 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,71 @@ | ||
; RUN: not --crash llc -global-isel -mtriple=amdgcn -mcpu=gfx90a -verify-machineinstrs -stop-after=instruction-select < %s | ||
|
||
define ptr addrspace(0) @buffer_load_p0(ptr addrspace(8) inreg %buf) { | ||
%ret = call ptr addrspace(0) @llvm.amdgcn.raw.ptr.buffer.load.p0(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret ptr addrspace(0) %ret | ||
} | ||
|
||
define void @buffer_store_p0(ptr addrspace(0) %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.p0(ptr addrspace(0) %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the addrspace(0)s everywhere |
||
ret void | ||
} | ||
|
||
define ptr addrspace(1) @buffer_load_p1(ptr addrspace(8) inreg %buf) { | ||
%ret = call ptr addrspace(1) @llvm.amdgcn.raw.ptr.buffer.load.p1(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret ptr addrspace(1) %ret | ||
} | ||
|
||
define void @buffer_store_p1(ptr addrspace(1) %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.p1(ptr addrspace(1) %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret void | ||
} | ||
|
||
define ptr addrspace(4) @buffer_load_p4(ptr addrspace(8) inreg %buf) { | ||
%ret = call ptr addrspace(4) @llvm.amdgcn.raw.ptr.buffer.load.p4(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret ptr addrspace(4) %ret | ||
} | ||
|
||
define void @buffer_store_p4(ptr addrspace(4) %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.p4(ptr addrspace(4) %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret void | ||
} | ||
|
||
define ptr addrspace(5) @buffer_load_p5(ptr addrspace(8) inreg %buf) { | ||
%ret = call ptr addrspace(5) @llvm.amdgcn.raw.ptr.buffer.load.p5(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret ptr addrspace(5) %ret | ||
} | ||
|
||
define void @buffer_store_p5(ptr addrspace(5) %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.p5(ptr addrspace(5) %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret void | ||
} | ||
|
||
define <2 x ptr addrspace(1)> @buffer_load_v2p1(ptr addrspace(8) inreg %buf) { | ||
%ret = call <2 x ptr addrspace(1)> @llvm.amdgcn.raw.ptr.buffer.load.v2p1(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret <2 x ptr addrspace(1)> %ret | ||
} | ||
|
||
define void @buffer_store_v2p5(<2 x ptr addrspace(1)> %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.v2p1(<2 x ptr addrspace(1)> %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret void | ||
} | ||
|
||
define <3 x ptr addrspace(5)> @buffer_load_v3p5(ptr addrspace(8) inreg %buf) { | ||
%ret = call <3 x ptr addrspace(5)> @llvm.amdgcn.raw.ptr.buffer.load.v3p5(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret <3 x ptr addrspace(5)> %ret | ||
} | ||
|
||
define void @buffer_store_v3p5(<3 x ptr addrspace(5)> %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.v3p5(<3 x ptr addrspace(5)> %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret void | ||
} | ||
|
||
define <4 x ptr addrspace(5)> @buffer_load_v4p5(ptr addrspace(8) inreg %buf) { | ||
%ret = call <4 x ptr addrspace(5)> @llvm.amdgcn.raw.ptr.buffer.load.v4p5(ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret <4 x ptr addrspace(5)> %ret | ||
} | ||
|
||
define void @buffer_store_v4p5(<4 x ptr addrspace(5)> %data, ptr addrspace(8) inreg %buf) { | ||
call void @llvm.amdgcn.raw.ptr.buffer.store.v4p5(<4 x ptr addrspace(5)> %data, ptr addrspace(8) inreg %buf, i32 0, i32 0, i32 0) | ||
ret void | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally don't precommit tests that fail. Also don't need -verify-machineinstrs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know about not precommiting tests that crash - I remember way back in the day someone wanting a
not --crash
test for a bug I was fixing, hence the precommitThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes it makes sense, but I don't think it does here