1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn-amd-amdhsa -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s 3 4--- 5name: trunc_s32_shl_s64_5 6legalized: true 7tracksRegLiveness: true 8body: | 9 bb.0: 10 liveins: $vgpr0_vgpr1 11 12 ; CHECK-LABEL: name: trunc_s32_shl_s64_5 13 ; CHECK: liveins: $vgpr0_vgpr1 14 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1 15 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 16 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64) 17 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[TRUNC]], [[C]](s32) 18 ; CHECK: $vgpr0 = COPY [[SHL]](s32) 19 %0:_(s64) = COPY $vgpr0_vgpr1 20 %1:_(s32) = G_CONSTANT i32 1 21 %2:_(s64) = G_SHL %0:_, %1 22 %3:_(s32) = G_TRUNC %2 23 $vgpr0 = COPY %3 24... 25 26--- 27name: trunc_s16_shl_s32_5 28legalized: true 29tracksRegLiveness: true 30body: | 31 bb.0: 32 liveins: $vgpr0 33 34 ; CHECK-LABEL: name: trunc_s16_shl_s32_5 35 ; CHECK: liveins: $vgpr0 36 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 37 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 38 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32) 39 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32) 40 ; CHECK: S_ENDPGM 0, implicit [[TRUNC]](s16) 41 %0:_(s32) = COPY $vgpr0 42 %1:_(s32) = G_CONSTANT i32 1 43 %2:_(s32) = G_SHL %0:_, %1 44 %3:_(s16) = G_TRUNC %2 45 S_ENDPGM 0, implicit %3 46 47... 48 49--- 50name: trunc_s16_shl_s64_5 51legalized: true 52tracksRegLiveness: true 53body: | 54 bb.0: 55 liveins: $vgpr0_vgpr1 56 57 ; CHECK-LABEL: name: trunc_s16_shl_s64_5 58 ; CHECK: liveins: $vgpr0_vgpr1 59 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1 60 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 61 ; CHECK: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s32) 62 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s64) 63 ; CHECK: S_ENDPGM 0, implicit [[TRUNC]](s16) 64 %0:_(s64) = COPY $vgpr0_vgpr1 65 %1:_(s32) = G_CONSTANT i32 1 66 %2:_(s64) = G_SHL %0:_, %1 67 %3:_(s16) = G_TRUNC %2 68 S_ENDPGM 0, implicit %3 69 70... 71