1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck %s
4 # The only simple instruction selection for G_SBFX/G_UBFX are the 64-bit
5 # vector versions. All other versions are expanded during register bank
12 tracksRegLiveness: true
16 ; CHECK-LABEL: name: ubfx_s32_vii
17 ; CHECK: liveins: $vgpr0
19 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
20 ; CHECK-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 2, implicit $exec
21 ; CHECK-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 10, implicit $exec
22 ; CHECK-NEXT: [[V_BFE_U32_e64_:%[0-9]+]]:vgpr_32 = V_BFE_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], implicit $exec
23 ; CHECK-NEXT: S_ENDPGM 0, implicit [[V_BFE_U32_e64_]]
24 %0:vgpr(s32) = COPY $vgpr0
25 %1:vgpr(s32) = G_CONSTANT i32 2
26 %2:vgpr(s32) = G_CONSTANT i32 10
27 %3:vgpr(s32) = G_UBFX %0, %1(s32), %2
28 S_ENDPGM 0, implicit %3
35 tracksRegLiveness: true
38 liveins: $vgpr0, $vgpr1, $vgpr2
39 ; CHECK-LABEL: name: ubfx_s32_vvv
40 ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2
42 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
43 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
44 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
45 ; CHECK-NEXT: [[V_BFE_U32_e64_:%[0-9]+]]:vgpr_32 = V_BFE_U32_e64 [[COPY]], [[COPY1]], [[COPY2]], implicit $exec
46 ; CHECK-NEXT: S_ENDPGM 0, implicit [[V_BFE_U32_e64_]]
47 %0:vgpr(s32) = COPY $vgpr0
48 %1:vgpr(s32) = COPY $vgpr1
49 %2:vgpr(s32) = COPY $vgpr2
50 %3:vgpr(s32) = G_UBFX %0, %1(s32), %2
51 S_ENDPGM 0, implicit %3