1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s 4 5--- 6name: ctpop_s32_s 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $sgpr0 12 ; CHECK-LABEL: name: ctpop_s32_s 13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 14 ; CHECK: [[CTPOP:%[0-9]+]]:sgpr(s32) = G_CTPOP [[COPY]](s32) 15 ; CHECK: S_ENDPGM 0, implicit [[CTPOP]](s32) 16 %0:_(s32) = COPY $sgpr0 17 %1:_(s32) = G_CTPOP %0 18 S_ENDPGM 0, implicit %1 19... 20 21--- 22name: ctpop_s32_v 23legalized: true 24 25body: | 26 bb.0: 27 liveins: $vgpr0 28 ; CHECK-LABEL: name: ctpop_s32_v 29 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 30 ; CHECK: [[CTPOP:%[0-9]+]]:vgpr(s32) = G_CTPOP [[COPY]](s32) 31 ; CHECK: S_ENDPGM 0, implicit [[CTPOP]](s32) 32 %0:_(s32) = COPY $vgpr0 33 %1:_(s32) = G_CTPOP %0 34 S_ENDPGM 0, implicit %1 35... 36 37--- 38name: ctpop_s64_s 39legalized: true 40 41body: | 42 bb.0: 43 liveins: $sgpr0_sgpr1 44 45 ; CHECK-LABEL: name: ctpop_s64_s 46 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 47 ; CHECK: [[CTPOP:%[0-9]+]]:sgpr(s32) = G_CTPOP [[COPY]](s64) 48 ; CHECK: S_ENDPGM 0, implicit [[CTPOP]](s32) 49 %0:_(s64) = COPY $sgpr0_sgpr1 50 %1:_(s32) = G_CTPOP %0 51 S_ENDPGM 0, implicit %1 52... 53 54--- 55name: ctpop_s64_v 56legalized: true 57 58body: | 59 bb.0: 60 liveins: $vgpr0_vgpr1 61 62 ; CHECK-LABEL: name: ctpop_s64_v 63 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 64 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64) 65 ; CHECK: [[CTPOP:%[0-9]+]]:vgpr(s32) = G_CTPOP [[UV]](s32) 66 ; CHECK: [[CTPOP1:%[0-9]+]]:vgpr(s32) = G_CTPOP [[UV1]](s32) 67 ; CHECK: [[ADD:%[0-9]+]]:vgpr(s32) = G_ADD [[CTPOP1]], [[CTPOP]] 68 ; CHECK: S_ENDPGM 0, implicit [[ADD]](s32) 69 %0:_(s64) = COPY $vgpr0_vgpr1 70 %1:_(s32) = G_CTPOP %0 71 S_ENDPGM 0, implicit %1 72... 73