Skip to content

Commit 3c1c3f2

Browse files
committed
[AMDGPU] Add new MIR test that will demonstate the changes need to address #129984.
1 parent b2e2ae8 commit 3c1c3f2

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -start-before=si-shrink-instructions -stop-before=si-post-ra-bundler -o - %s | FileCheck -check-prefix=GCN %s
3+
4+
---
5+
name: shrink-select-hint
6+
tracksRegLiveness: true
7+
body: |
8+
bb.0:
9+
; GCN-LABEL: name: shrink-select-hint
10+
; GCN: renamable $sgpr0 = S_MOV_B32 0
11+
; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 0
12+
; GCN-NEXT: renamable $sgpr2 = S_MOV_B32 0
13+
; GCN-NEXT: renamable $sgpr0 = S_ADD_U32 killed renamable $sgpr0, killed renamable $sgpr1, implicit-def $scc
14+
; GCN-NEXT: renamable $sgpr1 = S_CSELECT_B32 killed renamable $sgpr2, 31744, implicit killed $scc
15+
; GCN-NEXT: S_ENDPGM 0, implicit killed renamable $sgpr1, implicit killed renamable $sgpr0
16+
%0:sgpr_32 = S_MOV_B32 0
17+
%1:sgpr_32 = S_MOV_B32 0
18+
%2:sgpr_32 = S_MOV_B32 0
19+
%3:sgpr_32 = S_ADD_U32 killed %0, %1, implicit-def $scc
20+
%4:sgpr_32 = S_CSELECT_B32 %2, 31744, implicit $scc
21+
S_ENDPGM 0, implicit %4, implicit %3
22+
...
23+
---
24+
name: shrink-select-b32
25+
tracksRegLiveness: true
26+
body: |
27+
bb.0:
28+
; GCN-LABEL: name: shrink-select-b32
29+
; GCN: renamable $sgpr0 = S_CSELECT_B32 undef renamable $sgpr0, 31744, implicit undef $scc
30+
; GCN-NEXT: S_ENDPGM 0, implicit killed renamable $sgpr0
31+
%0:sgpr_32 = IMPLICIT_DEF
32+
$scc = IMPLICIT_DEF
33+
%1:sgpr_32 = S_CSELECT_B32 %0, 31744, implicit $scc
34+
S_ENDPGM 0, implicit %1
35+
...
36+
---
37+
name: shrink-select-b64
38+
tracksRegLiveness: true
39+
body: |
40+
bb.0:
41+
; GCN-LABEL: name: shrink-select-b64
42+
; GCN: renamable $sgpr0_sgpr1 = S_CSELECT_B64 undef renamable $sgpr0_sgpr1, 31744, implicit undef $scc
43+
; GCN-NEXT: S_ENDPGM 0, implicit killed renamable $sgpr0_sgpr1
44+
%0:sgpr_64 = IMPLICIT_DEF
45+
$scc = IMPLICIT_DEF
46+
%1:sgpr_64 = S_CSELECT_B64 %0, 31744, implicit $scc
47+
S_ENDPGM 0, implicit %1
48+
...
49+
---
50+
name: shrink-select-non-kimm
51+
tracksRegLiveness: true
52+
body: |
53+
bb.0:
54+
; GCN-LABEL: name: shrink-select-non-kimm
55+
; GCN: renamable $sgpr0 = S_CSELECT_B32 undef renamable $sgpr0, 16, implicit undef $scc
56+
; GCN-NEXT: S_ENDPGM 0, implicit killed renamable $sgpr0
57+
%0:sgpr_32 = IMPLICIT_DEF
58+
$scc = IMPLICIT_DEF
59+
%1:sgpr_32 = S_CSELECT_B32 %0, 16, implicit $scc
60+
S_ENDPGM 0, implicit %1
61+
...
62+
---
63+
name: shrink-select-reg
64+
tracksRegLiveness: true
65+
body: |
66+
bb.0:
67+
; GCN-LABEL: name: shrink-select-reg
68+
; GCN: renamable $sgpr0 = S_CSELECT_B32 undef renamable $sgpr0, undef renamable $sgpr0, implicit undef $scc
69+
; GCN-NEXT: S_ENDPGM 0, implicit killed renamable $sgpr0
70+
%0:sgpr_32 = IMPLICIT_DEF
71+
%1:sgpr_32 = IMPLICIT_DEF
72+
$scc = IMPLICIT_DEF
73+
%2:sgpr_32 = S_CSELECT_B32 %0, %1, implicit $scc
74+
S_ENDPGM 0, implicit %2
75+
...

0 commit comments

Comments
 (0)