@@ -167,3 +167,59 @@ body: |
167167 %1:sreg_32 = COPY %0
168168 S_BRANCH %bb.2
169169 ...
170+
171+ ---
172+
173+ name : phi_moveimm_av_pseudo_input
174+ tracksRegLiveness : true
175+ body : |
176+ ; GCN-LABEL: name: phi_moveimm_av_pseudo_input
177+ ; GCN: bb.0:
178+ ; GCN-NEXT: successors: %bb.1(0x80000000)
179+ ; GCN-NEXT: liveins: $sgpr0, $sgpr1
180+ ; GCN-NEXT: {{ $}}
181+ ; GCN-NEXT: [[AV_MOV_:%[0-9]+]]:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 0, implicit $exec
182+ ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
183+ ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
184+ ; GCN-NEXT: {{ $}}
185+ ; GCN-NEXT: bb.1:
186+ ; GCN-NEXT: successors: %bb.2(0x80000000)
187+ ; GCN-NEXT: {{ $}}
188+ ; GCN-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc
189+ ; GCN-NEXT: S_BRANCH %bb.2
190+ ; GCN-NEXT: {{ $}}
191+ ; GCN-NEXT: bb.2:
192+ ; GCN-NEXT: successors: %bb.3(0x80000000)
193+ ; GCN-NEXT: {{ $}}
194+ ; GCN-NEXT: [[PHI:%[0-9]+]]:sreg_32 = PHI %5, %bb.3, [[S_ADD_U32_]], %bb.1
195+ ; GCN-NEXT: S_BRANCH %bb.3
196+ ; GCN-NEXT: {{ $}}
197+ ; GCN-NEXT: bb.3:
198+ ; GCN-NEXT: successors: %bb.2(0x80000000)
199+ ; GCN-NEXT: {{ $}}
200+ ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 0
201+ ; GCN-NEXT: S_BRANCH %bb.2
202+ bb.0:
203+ successors: %bb.1
204+ liveins: $sgpr0, $sgpr1
205+
206+ %0:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 0, implicit $exec
207+
208+ %4:sreg_32 = COPY $sgpr0
209+ %5:sreg_32 = COPY $sgpr1
210+
211+ bb.1:
212+ successors: %bb.2
213+ %2:sreg_32 = S_ADD_U32 %4, %5, implicit-def $scc
214+ S_BRANCH %bb.2
215+
216+ bb.2:
217+ successors: %bb.3
218+ %3:sreg_32 = PHI %1, %bb.3, %2, %bb.1
219+ S_BRANCH %bb.3
220+
221+ bb.3:
222+ successors: %bb.2
223+ %1:sreg_32 = COPY %0
224+ S_BRANCH %bb.2
225+ ...
0 commit comments