Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions llvm/test/CodeGen/AMDGPU/spill-partial-csr-sgpr-live-ins.mir
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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: *** 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

...