1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -run-pass=si-fold-operands -verify-machineinstrs -o - %s | FileCheck --check-prefix=GCN %s
4 # Do not fold noninlinable constants in instructions like fmaak and fmamk next
5 # to kimm16 and kimm32 operands
9 tracksRegLiveness: true
14 ; GCN-LABEL: name: fmaak_f16
15 ; GCN: liveins: $vgpr0
17 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
18 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 14950, implicit $exec
19 ; GCN-NEXT: [[V_FMAAK_F16_:%[0-9]+]]:vgpr_32 = contract nofpexcept V_FMAAK_F16 [[COPY]], [[V_MOV_B32_e32_]], 11878, implicit $mode, implicit $exec
20 ; GCN-NEXT: $vgpr0 = COPY [[V_FMAAK_F16_]]
21 %0:vgpr_32 = COPY $vgpr0
22 %1:vgpr_32 = V_MOV_B32_e32 14950, implicit $exec
23 %2:vgpr_32 = contract nofpexcept V_FMAAK_F16 %0, %1, 11878, implicit $mode, implicit $exec
29 tracksRegLiveness: true
34 ; GCN-LABEL: name: fmamk_f16
35 ; GCN: liveins: $vgpr0
37 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
38 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 14950, implicit $exec
39 ; GCN-NEXT: [[V_FMAMK_F16_:%[0-9]+]]:vgpr_32 = contract nofpexcept V_FMAMK_F16 [[COPY]], 11878, [[V_MOV_B32_e32_]], implicit $mode, implicit $exec
40 ; GCN-NEXT: $vgpr0 = COPY [[V_FMAMK_F16_]]
41 %0:vgpr_32 = COPY $vgpr0
42 %1:vgpr_32 = V_MOV_B32_e32 14950, implicit $exec
43 %2:vgpr_32 = contract nofpexcept V_FMAMK_F16 %0, 11878, %1, implicit $mode, implicit $exec
49 tracksRegLiveness: true
54 ; GCN-LABEL: name: fmaak_f32
55 ; GCN: liveins: $vgpr0
57 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
58 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 979789416, implicit $exec
59 ; GCN-NEXT: [[V_FMAAK_F32_:%[0-9]+]]:vgpr_32 = contract nofpexcept V_FMAAK_F32 [[COPY]], [[V_MOV_B32_e32_]], 778462824, implicit $mode, implicit $exec
60 ; GCN-NEXT: $vgpr0 = COPY [[V_FMAAK_F32_]]
61 %0:vgpr_32 = COPY $vgpr0
62 %1:vgpr_32 = V_MOV_B32_e32 979789416, implicit $exec
63 %2:vgpr_32 = contract nofpexcept V_FMAAK_F32 %0, %1, 778462824, implicit $mode, implicit $exec
69 tracksRegLiveness: true
74 ; GCN-LABEL: name: fmamk_f32
75 ; GCN: liveins: $vgpr0
77 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
78 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 979789416, implicit $exec
79 ; GCN-NEXT: [[V_FMAMK_F32_:%[0-9]+]]:vgpr_32 = contract nofpexcept V_FMAMK_F32 [[COPY]], 778462824, [[V_MOV_B32_e32_]], implicit $mode, implicit $exec
80 ; GCN-NEXT: $vgpr0 = COPY [[V_FMAMK_F32_]]
81 %0:vgpr_32 = COPY $vgpr0
82 %1:vgpr_32 = V_MOV_B32_e32 979789416, implicit $exec
83 %2:vgpr_32 = contract nofpexcept V_FMAMK_F32 %0, 778462824, %1, implicit $mode, implicit $exec