Skip to content

Commit ca5b52f

Browse files
arsenmsvkeerthy
authored andcommitted
AMDGPU: Add baseline tests for #139317 (#140607)
1 parent 3fa5707 commit ca5b52f

6 files changed

+1329
-5
lines changed
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx90a -run-pass=si-fold-operands %s -o - | FileCheck -check-prefix=GCN %s
3+
4+
---
5+
name: v_mov_b64_pseudo_imm_0_copy_to_areg_64
6+
tracksRegLiveness: true
7+
body: |
8+
bb.0:
9+
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_to_areg_64
10+
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
11+
; GCN-NEXT: [[COPY:%[0-9]+]]:areg_64_align2 = COPY [[V_MOV_B]]
12+
; GCN-NEXT: $agpr0_agpr1 = COPY [[COPY]]
13+
; GCN-NEXT: S_ENDPGM 0
14+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
15+
%1:areg_64_align2 = COPY %0
16+
$agpr0_agpr1 = COPY %1
17+
S_ENDPGM 0
18+
19+
...
20+
21+
---
22+
name: v_mov_b64_pseudo_imm_neg1_copy_to_areg_64
23+
tracksRegLiveness: true
24+
body: |
25+
bb.0:
26+
; GCN-LABEL: name: v_mov_b64_pseudo_imm_neg1_copy_to_areg_64
27+
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO -1, implicit $exec
28+
; GCN-NEXT: [[COPY:%[0-9]+]]:areg_64_align2 = COPY [[V_MOV_B]]
29+
; GCN-NEXT: $agpr0_agpr1 = COPY [[COPY]]
30+
; GCN-NEXT: S_ENDPGM 0
31+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO -1, implicit $exec
32+
%1:areg_64_align2 = COPY %0
33+
$agpr0_agpr1 = COPY %1
34+
S_ENDPGM 0
35+
36+
...
37+
38+
---
39+
name: v_mov_b64_pseudo_literal_copy_to_areg_64
40+
tracksRegLiveness: true
41+
body: |
42+
bb.0:
43+
; GCN-LABEL: name: v_mov_b64_pseudo_literal_copy_to_areg_64
44+
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 999, implicit $exec
45+
; GCN-NEXT: [[COPY:%[0-9]+]]:areg_64_align2 = COPY [[V_MOV_B]]
46+
; GCN-NEXT: $agpr0_agpr1 = COPY [[COPY]]
47+
; GCN-NEXT: S_ENDPGM 0
48+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 999, implicit $exec
49+
%1:areg_64_align2 = COPY %0
50+
$agpr0_agpr1 = COPY %1
51+
S_ENDPGM 0
52+
53+
...
54+
55+
---
56+
name: v_mov_b64_pseudo_imm_0_copy_sub0_to_agpr_32
57+
tracksRegLiveness: true
58+
body: |
59+
bb.0:
60+
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_sub0_to_agpr_32
61+
; GCN: [[V_ACCVGPR_WRITE_B32_e64_:%[0-9]+]]:agpr_32 = V_ACCVGPR_WRITE_B32_e64 0, implicit $exec
62+
; GCN-NEXT: $agpr0 = COPY [[V_ACCVGPR_WRITE_B32_e64_]]
63+
; GCN-NEXT: S_ENDPGM 0
64+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
65+
%1:agpr_32 = COPY %0.sub0
66+
$agpr0 = COPY %1
67+
S_ENDPGM 0
68+
69+
...
70+
71+
---
72+
name: v_mov_b64_pseudo_imm_0_copy_sub1_to_agpr_32
73+
tracksRegLiveness: true
74+
body: |
75+
bb.0:
76+
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_sub1_to_agpr_32
77+
; GCN: [[V_ACCVGPR_WRITE_B32_e64_:%[0-9]+]]:agpr_32 = V_ACCVGPR_WRITE_B32_e64 0, implicit $exec
78+
; GCN-NEXT: $agpr0 = COPY [[V_ACCVGPR_WRITE_B32_e64_]]
79+
; GCN-NEXT: S_ENDPGM 0
80+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
81+
%1:agpr_32 = COPY %0.sub1
82+
$agpr0 = COPY %1
83+
S_ENDPGM 0
84+
85+
...
86+
87+
---
88+
name: v_mov_b64_pseudo_lit_copy_sub0_to_agpr_32
89+
tracksRegLiveness: true
90+
body: |
91+
bb.0:
92+
; GCN-LABEL: name: v_mov_b64_pseudo_lit_copy_sub0_to_agpr_32
93+
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
94+
; GCN-NEXT: [[COPY:%[0-9]+]]:agpr_32 = COPY [[V_MOV_B]].sub0
95+
; GCN-NEXT: $agpr0 = COPY [[COPY]]
96+
; GCN-NEXT: S_ENDPGM 0
97+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
98+
%1:agpr_32 = COPY %0.sub0
99+
$agpr0 = COPY %1
100+
S_ENDPGM 0
101+
102+
...
103+
104+
---
105+
name: v_mov_b64_pseudo_lit_copy_sub1_to_agpr_32
106+
tracksRegLiveness: true
107+
body: |
108+
bb.0:
109+
; GCN-LABEL: name: v_mov_b64_pseudo_lit_copy_sub1_to_agpr_32
110+
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
111+
; GCN-NEXT: [[COPY:%[0-9]+]]:agpr_32 = COPY [[V_MOV_B]].sub1
112+
; GCN-NEXT: $agpr0 = COPY [[COPY]]
113+
; GCN-NEXT: S_ENDPGM 0
114+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
115+
%1:agpr_32 = COPY %0.sub1
116+
$agpr0 = COPY %1
117+
S_ENDPGM 0
118+
119+
...
120+
121+
122+
---
123+
name: v_mov_b64_pseudo_imm_0_copy_to_av_64
124+
tracksRegLiveness: true
125+
body: |
126+
bb.0:
127+
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_to_av_64
128+
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
129+
; GCN-NEXT: [[COPY:%[0-9]+]]:av_64_align2 = COPY [[V_MOV_B]]
130+
; GCN-NEXT: S_ENDPGM 0, implicit [[COPY]]
131+
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
132+
%1:av_64_align2 = COPY %0
133+
S_ENDPGM 0, implicit %1
134+
135+
...

0 commit comments

Comments
 (0)