1# RUN: llc -march=amdgcn -run-pass peephole-opt -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s 2 3 4# GCN-LABEL: bb.0: 5# GCN: V_MOV_B32_e32 1092616192 6# GCN: S_MOV_B32 1082130432 7# GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec 8 9--- 10name: test src1-inlined 11body: | 12 bb.0: 13 liveins: $vgpr0, $sgpr0_sgpr1 14 15 %0:vgpr_32 = COPY $vgpr0 16 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 17 %18:sreg_32 = S_MOV_B32 1082130432 18 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %18, 0, %17, 0, 0, implicit $mode, implicit $exec 19 20... 21 22 23# GCN-LABEL: bb.0: 24# GCN: V_MOV_B32_e32 1092616192 25# GCN: S_MOV_B32 1082130432 26# GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec 27 28--- 29name: test src0-inlined 30body: | 31 bb.0: 32 liveins: $vgpr0, $sgpr0_sgpr1 33 34 %0:vgpr_32 = COPY $vgpr0 35 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 36 %18:sreg_32 = S_MOV_B32 1082130432 37 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec 38 39... 40 41# GCN-LABEL: bb.0: 42# GCN: V_MOV_B32_e32 1092616192 43# GCN: S_MOV_B32 1082130432 44# GCN: %3:vgpr_32 = V_MADAK_F32 killed %0, killed %0, 1092616192, implicit $mode, implicit $exec 45 46--- 47name: test none-inlined 48body: | 49 bb.0: 50 liveins: $vgpr0, $sgpr0_sgpr1 51 52 %0:vgpr_32 = COPY $vgpr0 53 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 54 %18:sreg_32 = S_MOV_B32 1082130432 55 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec 56 57... 58 59# GCN-LABEL: bb.0: 60# GCN: V_MOV_B32_e32 1092616192 61# GCN: V_MOV_B32_e32 1082130432 62# GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec 63 64--- 65name: test src1-2vgprs-inlined 66body: | 67 bb.0: 68 liveins: $vgpr0, $sgpr0_sgpr1 69 70 %0:vgpr_32 = COPY $vgpr0 71 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 72 %18:vgpr_32 = V_MOV_B32_e32 1082130432, implicit $exec 73 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %18, 0, %17, 0, 0, implicit $mode, implicit $exec 74 75... 76 77 78# GCN-LABEL: bb.0: 79# GCN: V_MOV_B32_e32 1092616192 80# GCN: V_MOV_B32_e32 1082130432 81# GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec 82 83--- 84name: test src0-2vgprs-inlined 85body: | 86 bb.0: 87 liveins: $vgpr0, $sgpr0_sgpr1 88 89 %0:vgpr_32 = COPY $vgpr0 90 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 91 %18:vgpr_32 = V_MOV_B32_e32 1082130432, implicit $exec 92 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec 93 94... 95 96# GCN-LABEL: bb.0: 97# GCN: V_MOV_B32_e32 1092616192, implicit $exec 98# GCN: S_MOV_B32 1082130432 99# GCN: V_MADAK_F32 1082130432, killed $vgpr1, 1092616192, implicit $mode, implicit $exec 100 101--- 102name: test src0-phys-vgpr 103body: | 104 bb.0: 105 liveins: $vgpr0, $sgpr0_sgpr1 106 107 108 $vgpr1 = COPY $vgpr0 109 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 110 %18:sgpr_32 = S_MOV_B32 1082130432 111 %19:vgpr_32 = V_MAC_F32_e64 0, killed $vgpr1, 0, killed %18, 0, %17, 0, 0, implicit $mode, implicit $exec 112 113... 114 115# GCN-LABEL: bb.0: 116# GCN: V_MOV_B32_e32 1092616192, implicit $exec 117# GCN: S_MOV_B32 1082130432 118# GCN: V_MADAK_F32 1082130432, killed $vgpr0, 1092616192, implicit $mode, implicit $exec 119 120--- 121name: test src1-phys-vgpr 122body: | 123 bb.0: 124 liveins: $vgpr0, $sgpr0_sgpr1 125 126 127 %0:vgpr_32 = COPY $vgpr0 128 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 129 %18:sgpr_32 = S_MOV_B32 1082130432 130 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed $vgpr0, 0, %17, 0, 0, implicit $mode, implicit $exec 131 132... 133 134# GCN-LABEL: bb.0: 135# GCN: V_MOV_B32_e32 1092616192, implicit $exec 136# GCN: V_MAC_F32_e64 0, killed $sgpr2, 0, killed %0, 0, %1, 0, 0, implicit $mode, implicit $exec 137 138--- 139name: test src0-phys-sgpr 140body: | 141 bb.0: 142 liveins: $vgpr0, $sgpr0_sgpr1, $sgpr2 143 144 145 %0:vgpr_32 = COPY $vgpr0 146 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 147 %19:vgpr_32 = V_MAC_F32_e64 0, killed $sgpr2, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec 148 149... 150 151# GCN-LABEL: bb.0: 152# GCN: V_MOV_B32_e32 1092616192, implicit $exec 153# GCN: V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %1, 0, 0, implicit $mode, implicit $exec 154 155--- 156name: test src1-phys-sgpr 157body: | 158 bb.0: 159 liveins: $vgpr0, $sgpr0_sgpr1, $sgpr2 160 161 162 %0:vgpr_32 = COPY $vgpr0 163 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 164 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %17, 0, 0, implicit $mode, implicit $exec 165 166... 167 168# GCN-LABEL: bb.0: 169# GCN: V_MOV_B32_e32 1092616192, implicit $exec 170# GCN: $sgpr2 = S_MOV_B32 1082130432 171# GCN: V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec 172 173--- 174name: test src1-phys-sgpr-move 175body: | 176 bb.0: 177 liveins: $vgpr0, $sgpr0_sgpr1 178 179 180 %0:vgpr_32 = COPY $vgpr0 181 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec 182 $sgpr2 = S_MOV_B32 1082130432 183 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %17, 0, 0, implicit $mode, implicit $exec 184 185... 186