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 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
12 liveins: $vgpr0, $vgpr1
14 ; GFX9-LABEL: name: fmul_v2f16_vv
15 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
16 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
17 ; GFX9: %2:vgpr_32 = nofpexcept V_PK_MUL_F16 8, [[COPY]], 8, [[COPY1]], 0, 0, 0, 0, 0, implicit $mode, implicit $exec
18 ; GFX9: S_ENDPGM 0, implicit %2
19 %0:vgpr(<2 x s16>) = COPY $vgpr0
20 %1:vgpr(<2 x s16>) = COPY $vgpr1
21 %2:vgpr(<2 x s16>) = G_FMUL %0, %1
22 S_ENDPGM 0, implicit %2
26 name: fmul_v2f16_fneg_v_fneg_v
32 liveins: $vgpr0, $vgpr1
34 ; GFX9-LABEL: name: fmul_v2f16_fneg_v_fneg_v
35 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
36 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
37 ; GFX9: %4:vgpr_32 = nofpexcept V_PK_MUL_F16 11, [[COPY]], 11, [[COPY1]], 0, 0, 0, 0, 0, implicit $mode, implicit $exec
38 ; GFX9: S_ENDPGM 0, implicit %4
39 %0:vgpr(<2 x s16>) = COPY $vgpr0
40 %1:vgpr(<2 x s16>) = COPY $vgpr1
41 %2:vgpr(<2 x s16>) = G_FNEG %0
42 %3:vgpr(<2 x s16>) = G_FNEG %1
43 %4:vgpr(<2 x s16>) = G_FMUL %2, %3
44 S_ENDPGM 0, implicit %4
48 name: fmul_v2f16_fneg_lo_v_v
54 liveins: $vgpr0, $vgpr1, $vgpr2
56 ; GFX9-LABEL: name: fmul_v2f16_fneg_lo_v_v
57 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32(<2 x s16>) = COPY $vgpr0
58 ; GFX9: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
59 ; GFX9: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
60 ; GFX9: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
61 ; GFX9: [[FNEG:%[0-9]+]]:vgpr(s16) = G_FNEG [[TRUNC]]
62 ; GFX9: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[FNEG]](s16)
63 ; GFX9: [[BUILD_VECTOR_TRUNC:%[0-9]+]]:vgpr_32(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[ANYEXT]](s32), [[COPY2]](s32)
64 ; 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
65 ; GFX9: S_ENDPGM 0, implicit %7(<2 x s16>)
66 %0:vgpr(<2 x s16>) = COPY $vgpr0
67 %1:vgpr(s32) = COPY $vgpr1
68 %2:vgpr(s32) = COPY $vgpr2
69 %3:vgpr(s16) = G_TRUNC %1
70 %4:vgpr(s16) = G_FNEG %3
71 %5:vgpr(s32) = G_ANYEXT %4
72 %6:vgpr(<2 x s16>) = G_BUILD_VECTOR_TRUNC %5, %2
73 %7:vgpr(<2 x s16>) = G_FMUL %6, %0
74 S_ENDPGM 0, implicit %7