Skip to content

Commit 5d344ac

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

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs -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
25+
tracksRegLiveness: true
26+
body: |
27+
bb.0:
28+
; GCN-LABEL: name: shrink-select
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+
...

0 commit comments

Comments
 (0)