1
1
# 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
3
3
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.
23
4
---
24
5
name : spill_partial_live_csr_sgpr_test
25
6
tracksRegLiveness : true
@@ -30,7 +11,22 @@ liveins:
30
11
body : |
31
12
bb.0:
32
13
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
34
30
S_NOP 0, implicit $sgpr50
35
31
$sgpr50 = S_MOV_B32 0
36
32
S_NOP 0, implicit $sgpr52
0 commit comments