1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck %s 4 5--- 6name: fshr_sss 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $sgpr0, $sgpr1, $sgpr2 12 ; CHECK-LABEL: name: fshr_sss 13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 15 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 16 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 17 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 18 ; CHECK: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32) 19 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY4]], [[COPY5]](s32) 20 %0:_(s32) = COPY $sgpr0 21 %1:_(s32) = COPY $sgpr1 22 %2:_(s32) = COPY $sgpr2 23 %3:_(s32) = G_FSHR %0, %1, %2 24... 25--- 26name: fshr_vss 27legalized: true 28 29body: | 30 bb.0: 31 liveins: $vgpr0, $sgpr0, $sgpr1 32 ; CHECK-LABEL: name: fshr_vss 33 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 34 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 35 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 36 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 37 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32) 38 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY3]], [[COPY4]](s32) 39 %0:_(s32) = COPY $vgpr0 40 %1:_(s32) = COPY $sgpr0 41 %2:_(s32) = COPY $sgpr1 42 %3:_(s32) = G_FSHR %0, %1, %2 43... 44--- 45name: fshr_svs 46legalized: true 47 48body: | 49 bb.0: 50 liveins: $sgpr0, $vgpr0, $sgpr1 51 ; CHECK-LABEL: name: fshr_svs 52 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 53 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 54 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 55 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 56 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32) 57 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY1]], [[COPY4]](s32) 58 %0:_(s32) = COPY $sgpr0 59 %1:_(s32) = COPY $vgpr0 60 %2:_(s32) = COPY $sgpr1 61 %3:_(s32) = G_FSHR %0, %1, %2 62... 63--- 64name: fshr_ssv 65legalized: true 66 67body: | 68 bb.0: 69 liveins: $sgpr0, $sgpr1, $vgpr0 70 ; CHECK-LABEL: name: fshr_ssv 71 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 72 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 73 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 74 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 75 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 76 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY4]], [[COPY2]](s32) 77 %0:_(s32) = COPY $sgpr0 78 %1:_(s32) = COPY $sgpr1 79 %2:_(s32) = COPY $vgpr0 80 %3:_(s32) = G_FSHR %0, %1, %2 81... 82--- 83name: fshr_vvs 84legalized: true 85 86body: | 87 bb.0: 88 liveins: $vgpr0, $vgpr1, $sgpr0 89 ; CHECK-LABEL: name: fshr_vvs 90 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 91 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 92 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 93 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32) 94 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY1]], [[COPY3]](s32) 95 %0:_(s32) = COPY $vgpr0 96 %1:_(s32) = COPY $vgpr1 97 %2:_(s32) = COPY $sgpr0 98 %3:_(s32) = G_FSHR %0, %1, %2 99... 100--- 101name: fshr_vsv 102legalized: true 103 104body: | 105 bb.0: 106 liveins: $vgpr0, $sgpr0, $vgpr1 107 ; CHECK-LABEL: name: fshr_vsv 108 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 109 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 110 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 111 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 112 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY3]], [[COPY2]](s32) 113 %0:_(s32) = COPY $vgpr0 114 %1:_(s32) = COPY $sgpr1 115 %2:_(s32) = COPY $vgpr1 116 %3:_(s32) = G_FSHR %0, %1, %2 117... 118--- 119name: fshr_svv 120legalized: true 121 122body: | 123 bb.0: 124 liveins: $sgpr0, $vgpr0, $vgpr1 125 ; CHECK-LABEL: name: fshr_svv 126 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 127 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 128 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 129 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 130 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY1]], [[COPY2]](s32) 131 %0:_(s32) = COPY $sgpr0 132 %1:_(s32) = COPY $vgpr0 133 %2:_(s32) = COPY $vgpr1 134 %3:_(s32) = G_FSHR %0, %1, %2 135... 136--- 137name: fshr_vvv 138legalized: true 139 140body: | 141 bb.0: 142 liveins: $vgpr0, $vgpr1, $vgpr2 143 ; CHECK-LABEL: name: fshr_vvv 144 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 145 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 146 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2 147 ; CHECK: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY1]], [[COPY2]](s32) 148 %0:_(s32) = COPY $vgpr0 149 %1:_(s32) = COPY $vgpr1 150 %2:_(s32) = COPY $vgpr2 151 %3:_(s32) = G_FSHR %0, %1, %2 152... 153