1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s 3 4--- 5name: fmul_v2f16_vv 6legalized: true 7regBankSelected: true 8 9body: | 10 bb.0: 11 liveins: $vgpr0, $vgpr1 12 13 ; GFX9-LABEL: name: fmul_v2f16_vv 14 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 15 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 16 ; GFX9: %2:vgpr_32 = nofpexcept V_PK_MUL_F16 8, [[COPY]], 8, [[COPY1]], 0, 0, 0, 0, 0, implicit $mode, implicit $exec 17 ; GFX9: S_ENDPGM 0, implicit %2 18 %0:vgpr(<2 x s16>) = COPY $vgpr0 19 %1:vgpr(<2 x s16>) = COPY $vgpr1 20 %2:vgpr(<2 x s16>) = G_FMUL %0, %1 21 S_ENDPGM 0, implicit %2 22... 23 24--- 25name: fmul_v2f16_fneg_v_fneg_v 26legalized: true 27regBankSelected: true 28 29body: | 30 bb.0: 31 liveins: $vgpr0, $vgpr1 32 33 ; GFX9-LABEL: name: fmul_v2f16_fneg_v_fneg_v 34 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 35 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 36 ; GFX9: %4:vgpr_32 = nofpexcept V_PK_MUL_F16 11, [[COPY]], 11, [[COPY1]], 0, 0, 0, 0, 0, implicit $mode, implicit $exec 37 ; GFX9: S_ENDPGM 0, implicit %4 38 %0:vgpr(<2 x s16>) = COPY $vgpr0 39 %1:vgpr(<2 x s16>) = COPY $vgpr1 40 %2:vgpr(<2 x s16>) = G_FNEG %0 41 %3:vgpr(<2 x s16>) = G_FNEG %1 42 %4:vgpr(<2 x s16>) = G_FMUL %2, %3 43 S_ENDPGM 0, implicit %4 44... 45 46--- 47name: fmul_v2f16_fneg_lo_v_v 48legalized: true 49regBankSelected: true 50 51body: | 52 bb.0: 53 liveins: $vgpr0, $vgpr1, $vgpr2 54 55 ; GFX9-LABEL: name: fmul_v2f16_fneg_lo_v_v 56 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32(<2 x s16>) = COPY $vgpr0 57 ; GFX9: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 58 ; GFX9: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2 59 ; GFX9: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32) 60 ; GFX9: [[FNEG:%[0-9]+]]:vgpr(s16) = G_FNEG [[TRUNC]] 61 ; GFX9: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[FNEG]](s16) 62 ; GFX9: [[BUILD_VECTOR_TRUNC:%[0-9]+]]:vgpr_32(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[ANYEXT]](s32), [[COPY2]](s32) 63 ; GFX9: %7:vgpr_32(<2 x s16>) = nofpexcept V_PK_MUL_F16 8, [[BUILD_VECTOR_TRUNC]](<2 x s16>), 8, [[COPY]](<2 x s16>), 0, 0, 0, 0, 0, implicit $mode, implicit $exec 64 ; GFX9: S_ENDPGM 0, implicit %7(<2 x s16>) 65 %0:vgpr(<2 x s16>) = COPY $vgpr0 66 %1:vgpr(s32) = COPY $vgpr1 67 %2:vgpr(s32) = COPY $vgpr2 68 %3:vgpr(s16) = G_TRUNC %1 69 %4:vgpr(s16) = G_FNEG %3 70 %5:vgpr(s32) = G_ANYEXT %4 71 %6:vgpr(<2 x s16>) = G_BUILD_VECTOR_TRUNC %5, %2 72 %7:vgpr(<2 x s16>) = G_FMUL %6, %0 73 S_ENDPGM 0, implicit %7 74... 75