1 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=si-shrink-instructions --verify-machineinstrs %s -o - | FileCheck %s
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -passes=si-shrink-instructions --verify-machineinstrs %s -o - | FileCheck %s
4 # Make sure immediate folding into V_CNDMASK respects constant bus restrictions.
7 name: shrink_cndmask_illegal_imm_folding
8 tracksRegLiveness: true
11 liveins: $vgpr0, $vgpr1
12 ; CHECK-LABEL: name: shrink_cndmask_illegal_imm_folding
13 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
14 ; CHECK: [[MOV:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 32768, implicit $exec
15 ; CHECK: V_CMP_EQ_U32_e32 0, [[COPY]], implicit-def $vcc, implicit $exec
16 ; CHECK: V_CNDMASK_B32_e32 [[MOV]], killed [[COPY]], implicit $vcc, implicit $exec
18 %0:vgpr_32 = COPY $vgpr0
19 %1:vgpr_32 = V_MOV_B32_e32 32768, implicit $exec
20 V_CMP_EQ_U32_e32 0, %0:vgpr_32, implicit-def $vcc, implicit $exec
21 %2:vgpr_32 = V_CNDMASK_B32_e64 0, %1:vgpr_32, 0, killed %0:vgpr_32, $vcc, implicit $exec