-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[AMDGPU][NFC] Added test for live-in CSR SGPR used partially giving MachineVerifier error #126696
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
vg0204
merged 3 commits into
llvm:main
from
vg0204:vg0204/xfail-mir-test-sgpr-csr-spill
Feb 25, 2025
+42
−0
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
52 changes: 52 additions & 0 deletions
52
llvm/test/CodeGen/AMDGPU/spill-partial-csr-sgpr-live-ins.mir
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,52 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py | ||
# RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass=si-lower-sgpr-spills -o - %s | FileCheck %s | ||
# XFAIL: * | ||
|
||
# FIXME : Currently, MRI's liveIn check for regiters does not take corresponding live-in's sub-registers in account. As a result | ||
vg0204 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# in SILowerSGPRSpills, the SubReg spill gets marked KILLED eventhough its SuperReg is in function Live-ins. This causes machine | ||
vg0204 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# verifier to now fail at direct usage of that SubReg, which intially should not be any problem before adding spill. | ||
|
||
vg0204 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# CHECK: *** Bad machine code: Using an undefined physical register *** | ||
|
||
--- | ||
name: spill_partial_live_csr_sgpr_argument_test_1 | ||
tracksRegLiveness: true | ||
liveins: | ||
- { reg: '$sgpr50_sgpr51' } | ||
body: | | ||
bb.0: | ||
liveins: $sgpr50_sgpr51 | ||
|
||
S_NOP 0, implicit $sgpr50 | ||
$sgpr50 = S_MOV_B32 0 | ||
|
||
... | ||
|
||
--- | ||
name: spill_partial_live_csr_sgpr_argument_test_2 | ||
tracksRegLiveness: true | ||
liveins: | ||
- { reg: '$sgpr50_sgpr51' } | ||
body: | | ||
bb.0: | ||
liveins: $sgpr50_sgpr51 | ||
|
||
S_NOP 0, implicit $sgpr50 | ||
$sgpr50_sgpr51 = S_MOV_B64 0 | ||
|
||
... | ||
|
||
--- | ||
name: spill_partial_live_csr_sgpr_argument_test_3 | ||
tracksRegLiveness: true | ||
liveins: | ||
- { reg: '$sgpr52_sgpr53' } | ||
body: | | ||
bb.0: | ||
liveins: $sgpr52_sgpr53 | ||
|
||
S_NOP 0, implicit $sgpr53 | ||
$sgpr52_sgpr53 = S_MOV_B64 0 | ||
$sgpr54 = S_MOV_B32 0 | ||
|
||
... |
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.
Uh oh!
There was an error while loading. Please reload this page.