1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck %s
12 liveins: $vgpr0, $vgpr1
14 ; CHECK-LABEL: name: fmaxnum_f16_vv
15 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
16 ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
17 ; CHECK: [[V_MAX_F16_e64_:%[0-9]+]]:vgpr_32 = V_MAX_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, 0, implicit $exec
18 ; CHECK: S_ENDPGM 0, implicit [[V_MAX_F16_e64_]]
19 %0:vgpr(s32) = COPY $vgpr0
20 %1:vgpr(s32) = COPY $vgpr1
21 %2:vgpr(s16) = G_TRUNC %0
22 %3:vgpr(s16) = G_TRUNC %1
23 %4:vgpr(s16) = G_FMAXNUM %2, %3
24 S_ENDPGM 0, implicit %4
28 name: fmaxnum_f16_v_fneg_v
34 liveins: $vgpr0, $vgpr1
36 ; CHECK-LABEL: name: fmaxnum_f16_v_fneg_v
37 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
38 ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
39 ; CHECK: [[V_MAX_F16_e64_:%[0-9]+]]:vgpr_32 = V_MAX_F16_e64 0, [[COPY]], 1, [[COPY1]], 0, 0, implicit $exec
40 ; CHECK: S_ENDPGM 0, implicit [[V_MAX_F16_e64_]]
41 %0:vgpr(s32) = COPY $vgpr0
42 %1:vgpr(s32) = COPY $vgpr1
43 %2:vgpr(s16) = G_TRUNC %0
44 %3:vgpr(s16) = G_TRUNC %1
45 %4:vgpr(s16) = G_FNEG %3
46 %5:vgpr(s16) = G_FMAXNUM %2, %4
47 S_ENDPGM 0, implicit %5