-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py | ||
# RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass=si-lower-sgpr-spills %s -o /dev/null 2>&1 | FileCheck -check-prefix=VERIFIER %s | ||
|
||
# FIXME : Currently, MRI's liveIn check for registers does not take the corresponding live-in's sub-registers into account. As a result | ||
# in SILowerSGPRSpills, the SubReg spill gets marked KILLED even though its SuperReg is in the function Live-ins. This causes machine | ||
# verifier to now fail at direct usage of that SubReg, which intially should not be any problem before adding spill. | ||
|
||
# VERIFIER: After SI lower SGPR spill instructions | ||
|
||
# VERIFIER: *** Bad machine code: Using an undefined physical register *** | ||
# VERIFIER: - instruction: S_NOP 0, implicit $sgpr50 | ||
# VERIFIER-NEXT: - operand 1: implicit $sgpr50 | ||
|
||
# VERIFIER: *** Bad machine code: Using an undefined physical register *** | ||
# VERIFIER: - instruction: S_NOP 0, implicit $sgpr52 | ||
# VERIFIER-NEXT: - operand 1: implicit $sgpr52 | ||
|
||
# VERIFIER: *** Bad machine code: Using an undefined physical register *** | ||
# VERIFIER: - instruction: S_NOP 0, implicit $sgpr55 | ||
# VERIFIER-NEXT: - operand 1: implicit $sgpr55 | ||
|
||
# VERIFIER: LLVM ERROR: Found 3 machine code errors. | ||
--- | ||
name: spill_partial_live_csr_sgpr_test | ||
tracksRegLiveness: true | ||
liveins: | ||
- { reg: '$sgpr50_sgpr51' } | ||
- { reg: '$sgpr52_sgpr53' } | ||
- { reg: '$sgpr54_sgpr55' } | ||
Comment on lines
+26
to
+29
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. Should drop the function live ins part. I don't believe it should be required for any liveness functionality 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. Needed for MRI's livein check as done in SILowerSGPRSpills. 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. SILowerSGPRSpills should not be depending on this information, and it is not being used in this test |
||
body: | | ||
bb.0: | ||
liveins: $sgpr50_sgpr51, $sgpr52_sgpr53, $sgpr54_sgpr55 | ||
|
||
S_NOP 0, implicit $sgpr50 | ||
$sgpr50 = S_MOV_B32 0 | ||
S_NOP 0, implicit $sgpr52 | ||
$sgpr52_sgpr53 = S_MOV_B64 0 | ||
S_NOP 0, implicit $sgpr55 | ||
$sgpr54_sgpr55 = S_MOV_B64 0 | ||
$sgpr56 = S_MOV_B32 0 | ||
... | ||
|
Uh oh!
There was an error while loading. Please reload this page.