-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[NFC][AMDGPU][GISel] Precommit GlobalISel specific tests for call instruction #165898
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
033db64
[NFC][AMDGPU][GISel] Precommit GlobalISel specific tests for call ins…
chinmaydd cfcf518
[NFC][AMDGPU]GISel] Add RUN lines to call tests
chinmaydd 646b794
[NFC][AMDGPU][GISel] Fix test
chinmaydd 4a17c23
[NFC][AMDGPU][GISel] Fix rebase
chinmaydd 1817588
[NFC][AMDGPU][GlobalISel] Add comment
chinmaydd df476c0
Merge branch 'main' into chinmaydd/gisel-call-precommit
chinmaydd a63f1c4
[NFC][AMDGPU][GlobalISel] Add another comment
chinmaydd 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
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,130 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 | ||
| ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -enable-var-scope -check-prefix=GFX9 %s | ||
| ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck -enable-var-scope -check-prefix=GFX11 %s | ||
|
|
||
| ; We've separated this file from call-args-inreg.ll since GlobalISel does not support the bfloat type. | ||
| ; Ideally, we should merge the two files once that support lands. | ||
|
|
||
| declare hidden void @external_void_func_bf16_inreg(bfloat inreg) #0 | ||
| declare hidden void @external_void_func_v2bf16_inreg(<2 x bfloat> inreg) #0 | ||
|
|
||
| define void @test_call_external_void_func_bf16_inreg(bfloat inreg %arg) #0 { | ||
| ; GFX9-LABEL: test_call_external_void_func_bf16_inreg: | ||
| ; GFX9: ; %bb.0: | ||
| ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
| ; GFX9-NEXT: s_mov_b32 s17, s33 | ||
| ; GFX9-NEXT: s_mov_b32 s33, s32 | ||
| ; GFX9-NEXT: s_or_saveexec_b64 s[18:19], -1 | ||
| ; GFX9-NEXT: buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill | ||
| ; GFX9-NEXT: s_mov_b64 exec, s[18:19] | ||
| ; GFX9-NEXT: v_writelane_b32 v40, s17, 2 | ||
| ; GFX9-NEXT: s_addk_i32 s32, 0x400 | ||
| ; GFX9-NEXT: v_writelane_b32 v40, s30, 0 | ||
| ; GFX9-NEXT: s_getpc_b64 s[18:19] | ||
| ; GFX9-NEXT: s_add_u32 s18, s18, external_void_func_bf16_inreg@rel32@lo+4 | ||
| ; GFX9-NEXT: s_addc_u32 s19, s19, external_void_func_bf16_inreg@rel32@hi+12 | ||
| ; GFX9-NEXT: s_mov_b32 s0, s16 | ||
| ; GFX9-NEXT: v_writelane_b32 v40, s31, 1 | ||
| ; GFX9-NEXT: s_swappc_b64 s[30:31], s[18:19] | ||
| ; GFX9-NEXT: v_readlane_b32 s31, v40, 1 | ||
| ; GFX9-NEXT: v_readlane_b32 s30, v40, 0 | ||
| ; GFX9-NEXT: s_mov_b32 s32, s33 | ||
| ; GFX9-NEXT: v_readlane_b32 s4, v40, 2 | ||
| ; GFX9-NEXT: s_or_saveexec_b64 s[6:7], -1 | ||
| ; GFX9-NEXT: buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload | ||
| ; GFX9-NEXT: s_mov_b64 exec, s[6:7] | ||
| ; GFX9-NEXT: s_mov_b32 s33, s4 | ||
| ; GFX9-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX9-NEXT: s_setpc_b64 s[30:31] | ||
| ; | ||
| ; GFX11-LABEL: test_call_external_void_func_bf16_inreg: | ||
| ; GFX11: ; %bb.0: | ||
| ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
| ; GFX11-NEXT: s_mov_b32 s1, s33 | ||
| ; GFX11-NEXT: s_mov_b32 s33, s32 | ||
| ; GFX11-NEXT: s_or_saveexec_b32 s2, -1 | ||
| ; GFX11-NEXT: scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill | ||
| ; GFX11-NEXT: s_mov_b32 exec_lo, s2 | ||
| ; GFX11-NEXT: v_writelane_b32 v40, s1, 2 | ||
| ; GFX11-NEXT: s_add_i32 s32, s32, 16 | ||
| ; GFX11-NEXT: s_getpc_b64 s[2:3] | ||
| ; GFX11-NEXT: s_add_u32 s2, s2, external_void_func_bf16_inreg@rel32@lo+4 | ||
| ; GFX11-NEXT: s_addc_u32 s3, s3, external_void_func_bf16_inreg@rel32@hi+12 | ||
| ; GFX11-NEXT: v_writelane_b32 v40, s30, 0 | ||
| ; GFX11-NEXT: v_writelane_b32 v40, s31, 1 | ||
| ; GFX11-NEXT: s_swappc_b64 s[30:31], s[2:3] | ||
| ; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | ||
| ; GFX11-NEXT: v_readlane_b32 s31, v40, 1 | ||
| ; GFX11-NEXT: v_readlane_b32 s30, v40, 0 | ||
| ; GFX11-NEXT: s_mov_b32 s32, s33 | ||
| ; GFX11-NEXT: v_readlane_b32 s0, v40, 2 | ||
| ; GFX11-NEXT: s_or_saveexec_b32 s1, -1 | ||
| ; GFX11-NEXT: scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload | ||
| ; GFX11-NEXT: s_mov_b32 exec_lo, s1 | ||
| ; GFX11-NEXT: s_mov_b32 s33, s0 | ||
| ; GFX11-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX11-NEXT: s_setpc_b64 s[30:31] | ||
| call void @external_void_func_bf16_inreg(bfloat inreg %arg) | ||
| ret void | ||
| } | ||
|
|
||
| define void @test_call_external_void_func_v2bf16_inreg(<2 x bfloat> inreg %arg) #0 { | ||
| ; GFX9-LABEL: test_call_external_void_func_v2bf16_inreg: | ||
| ; GFX9: ; %bb.0: | ||
| ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
| ; GFX9-NEXT: s_mov_b32 s17, s33 | ||
| ; GFX9-NEXT: s_mov_b32 s33, s32 | ||
| ; GFX9-NEXT: s_or_saveexec_b64 s[18:19], -1 | ||
| ; GFX9-NEXT: buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill | ||
| ; GFX9-NEXT: s_mov_b64 exec, s[18:19] | ||
| ; GFX9-NEXT: v_writelane_b32 v40, s17, 2 | ||
| ; GFX9-NEXT: s_addk_i32 s32, 0x400 | ||
| ; GFX9-NEXT: v_writelane_b32 v40, s30, 0 | ||
| ; GFX9-NEXT: s_getpc_b64 s[18:19] | ||
| ; GFX9-NEXT: s_add_u32 s18, s18, external_void_func_v2bf16_inreg@rel32@lo+4 | ||
| ; GFX9-NEXT: s_addc_u32 s19, s19, external_void_func_v2bf16_inreg@rel32@hi+12 | ||
| ; GFX9-NEXT: s_mov_b32 s0, s16 | ||
| ; GFX9-NEXT: v_writelane_b32 v40, s31, 1 | ||
| ; GFX9-NEXT: s_swappc_b64 s[30:31], s[18:19] | ||
| ; GFX9-NEXT: v_readlane_b32 s31, v40, 1 | ||
| ; GFX9-NEXT: v_readlane_b32 s30, v40, 0 | ||
| ; GFX9-NEXT: s_mov_b32 s32, s33 | ||
| ; GFX9-NEXT: v_readlane_b32 s4, v40, 2 | ||
| ; GFX9-NEXT: s_or_saveexec_b64 s[6:7], -1 | ||
| ; GFX9-NEXT: buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload | ||
| ; GFX9-NEXT: s_mov_b64 exec, s[6:7] | ||
| ; GFX9-NEXT: s_mov_b32 s33, s4 | ||
| ; GFX9-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX9-NEXT: s_setpc_b64 s[30:31] | ||
| ; | ||
| ; GFX11-LABEL: test_call_external_void_func_v2bf16_inreg: | ||
| ; GFX11: ; %bb.0: | ||
| ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
| ; GFX11-NEXT: s_mov_b32 s1, s33 | ||
| ; GFX11-NEXT: s_mov_b32 s33, s32 | ||
| ; GFX11-NEXT: s_or_saveexec_b32 s2, -1 | ||
| ; GFX11-NEXT: scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill | ||
| ; GFX11-NEXT: s_mov_b32 exec_lo, s2 | ||
| ; GFX11-NEXT: v_writelane_b32 v40, s1, 2 | ||
| ; GFX11-NEXT: s_add_i32 s32, s32, 16 | ||
| ; GFX11-NEXT: s_getpc_b64 s[2:3] | ||
| ; GFX11-NEXT: s_add_u32 s2, s2, external_void_func_v2bf16_inreg@rel32@lo+4 | ||
| ; GFX11-NEXT: s_addc_u32 s3, s3, external_void_func_v2bf16_inreg@rel32@hi+12 | ||
| ; GFX11-NEXT: v_writelane_b32 v40, s30, 0 | ||
| ; GFX11-NEXT: v_writelane_b32 v40, s31, 1 | ||
| ; GFX11-NEXT: s_swappc_b64 s[30:31], s[2:3] | ||
| ; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | ||
| ; GFX11-NEXT: v_readlane_b32 s31, v40, 1 | ||
| ; GFX11-NEXT: v_readlane_b32 s30, v40, 0 | ||
| ; GFX11-NEXT: s_mov_b32 s32, s33 | ||
| ; GFX11-NEXT: v_readlane_b32 s0, v40, 2 | ||
| ; GFX11-NEXT: s_or_saveexec_b32 s1, -1 | ||
| ; GFX11-NEXT: scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload | ||
| ; GFX11-NEXT: s_mov_b32 exec_lo, s1 | ||
| ; GFX11-NEXT: s_mov_b32 s33, s0 | ||
| ; GFX11-NEXT: s_waitcnt vmcnt(0) | ||
| ; GFX11-NEXT: s_setpc_b64 s[30:31] | ||
| call void @external_void_func_v2bf16_inreg(<2 x bfloat> inreg %arg) | ||
| 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.
Splitting this into a new file as GISel does not support the bfloat type
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.
Maybe add a comment to describe the situation here.