Skip to content

Commit df4bf0b

Browse files
committed
updated the pre-commit tests resolved via the extended MRI liveIns check.
1 parent e384137 commit df4bf0b

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

llvm/test/CodeGen/AMDGPU/spill-partial-csr-sgpr-live-ins.mir

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# 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
2+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass=si-lower-sgpr-spills -o - %s| FileCheck %s
33

4-
# FIXME : Currently, MRI's liveIn check for registers does not take the corresponding live-in's sub-registers into account. As a result
5-
# in SILowerSGPRSpills, the SubReg spill gets marked KILLED even though its SuperReg is in the function Live-ins. This causes machine
6-
# verifier to now fail at direct usage of that SubReg, which intially should not be any problem before adding spill.
7-
8-
# VERIFIER: After SI lower SGPR spill instructions
9-
10-
# VERIFIER: *** Bad machine code: Using an undefined physical register ***
11-
# VERIFIER: - instruction: S_NOP 0, implicit $sgpr50
12-
# VERIFIER-NEXT: - operand 1: implicit $sgpr50
13-
14-
# VERIFIER: *** Bad machine code: Using an undefined physical register ***
15-
# VERIFIER: - instruction: S_NOP 0, implicit $sgpr52
16-
# VERIFIER-NEXT: - operand 1: implicit $sgpr52
17-
18-
# VERIFIER: *** Bad machine code: Using an undefined physical register ***
19-
# VERIFIER: - instruction: S_NOP 0, implicit $sgpr55
20-
# VERIFIER-NEXT: - operand 1: implicit $sgpr55
21-
22-
# VERIFIER: LLVM ERROR: Found 3 machine code errors.
234
---
245
name: spill_partial_live_csr_sgpr_test
256
tracksRegLiveness: true
@@ -30,7 +11,22 @@ liveins:
3011
body: |
3112
bb.0:
3213
liveins: $sgpr50_sgpr51, $sgpr52_sgpr53, $sgpr54_sgpr55
33-
14+
; CHECK-LABEL: name: spill_partial_live_csr_sgpr_test
15+
; CHECK: liveins: $sgpr50, $sgpr52, $sgpr53, $sgpr54, $sgpr55, $sgpr56, $vgpr63, $sgpr50_sgpr51, $sgpr52_sgpr53, $sgpr54_sgpr55
16+
; CHECK-NEXT: {{ $}}
17+
; CHECK-NEXT: $vgpr63 = SI_SPILL_S32_TO_VGPR $sgpr50, 0, $vgpr63
18+
; CHECK-NEXT: $vgpr63 = SI_SPILL_S32_TO_VGPR $sgpr52, 1, $vgpr63
19+
; CHECK-NEXT: $vgpr63 = SI_SPILL_S32_TO_VGPR $sgpr53, 2, $vgpr63
20+
; CHECK-NEXT: $vgpr63 = SI_SPILL_S32_TO_VGPR $sgpr54, 3, $vgpr63
21+
; CHECK-NEXT: $vgpr63 = SI_SPILL_S32_TO_VGPR $sgpr55, 4, $vgpr63
22+
; CHECK-NEXT: $vgpr63 = SI_SPILL_S32_TO_VGPR killed $sgpr56, 5, $vgpr63
23+
; CHECK-NEXT: S_NOP 0, implicit $sgpr50
24+
; CHECK-NEXT: $sgpr50 = S_MOV_B32 0
25+
; CHECK-NEXT: S_NOP 0, implicit $sgpr52
26+
; CHECK-NEXT: $sgpr52_sgpr53 = S_MOV_B64 0
27+
; CHECK-NEXT: S_NOP 0, implicit $sgpr55
28+
; CHECK-NEXT: $sgpr54_sgpr55 = S_MOV_B64 0
29+
; CHECK-NEXT: $sgpr56 = S_MOV_B32 0
3430
S_NOP 0, implicit $sgpr50
3531
$sgpr50 = S_MOV_B32 0
3632
S_NOP 0, implicit $sgpr52

0 commit comments

Comments
 (0)