1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s 3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*' %s -o /dev/null 2>&1 | FileCheck -check-prefix=VI-ERR %s 4 5# VI-ERR-NOT: remark 6# VI-ERR: remark: <unknown>:0:0: cannot select: %6:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.fmed3), %3:vgpr(s16), %4:vgpr(s16), %5:vgpr(s16) (in function: fmed3_s16_vvvv) 7# VI-ERR-NEXT: remark: <unknown>:0:0: cannot select: %6:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.fmed3), %3:sgpr(s16), %4:vgpr(s16), %5:vgpr(s16) (in function: fmed3_s16_vsvv) 8# VI-ERR-NOT: remark 9--- 10name: fmed3_s16_vvvv 11legalized: true 12regBankSelected: true 13tracksRegLiveness: true 14 15body: | 16 bb.0: 17 liveins: $vgpr0, $vgpr1, $vgpr2 18 19 ; GCN-LABEL: name: fmed3_s16_vvvv 20 ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2 21 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 22 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 23 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2 24 ; GCN: %6:vgpr_32 = nofpexcept V_MED3_F16 0, [[COPY]], 0, [[COPY1]], 0, [[COPY2]], 0, 0, implicit $mode, implicit $exec 25 ; GCN: S_ENDPGM 0, implicit %6 26 %0:vgpr(s32) = COPY $vgpr0 27 %1:vgpr(s32) = COPY $vgpr1 28 %2:vgpr(s32) = COPY $vgpr2 29 %3:vgpr(s16) = G_TRUNC %0 30 %4:vgpr(s16) = G_TRUNC %1 31 %5:vgpr(s16) = G_TRUNC %2 32 %6:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.fmed3), %3, %4, %5 33 S_ENDPGM 0, implicit %6 34... 35 36--- 37name: fmed3_s16_vsvv 38legalized: true 39regBankSelected: true 40tracksRegLiveness: true 41 42body: | 43 bb.0: 44 liveins: $sgpr0, $vgpr0, $vgpr1 45 46 ; GCN-LABEL: name: fmed3_s16_vsvv 47 ; GCN: liveins: $sgpr0, $vgpr0, $vgpr1 48 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 49 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 50 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr1 51 ; GCN: %6:vgpr_32 = nofpexcept V_MED3_F16 0, [[COPY]], 0, [[COPY1]], 0, [[COPY2]], 0, 0, implicit $mode, implicit $exec 52 ; GCN: S_ENDPGM 0, implicit %6 53 %0:sgpr(s32) = COPY $sgpr0 54 %1:vgpr(s32) = COPY $vgpr0 55 %2:vgpr(s32) = COPY $vgpr1 56 %3:sgpr(s16) = G_TRUNC %0 57 %4:vgpr(s16) = G_TRUNC %1 58 %5:vgpr(s16) = G_TRUNC %2 59 %6:vgpr(s16) = G_INTRINSIC intrinsic(@llvm.amdgcn.fmed3), %3, %4, %5 60 S_ENDPGM 0, implicit %6 61... 62