brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.9 KiB · f3021ca Raw
141 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -o - %s  | FileCheck -check-prefix=GFX7 %s3 4---5 6name: fmaxnum_ieee_f32_f64_ieee_mode_on7legalized:       true8regBankSelected: true9machineFunctionInfo:10  mode:11    ieee: true12 13body: |14  bb.0:15    liveins: $sgpr0, $vgpr0, $vgpr1, $vgpr3_vgpr4, $sgpr10_sgpr11, $vgpr10_vgpr11, $vgpr12_vgpr1316    ; GFX7-LABEL: name: fmaxnum_ieee_f32_f64_ieee_mode_on17    ; GFX7: liveins: $sgpr0, $vgpr0, $vgpr1, $vgpr3_vgpr4, $sgpr10_sgpr11, $vgpr10_vgpr11, $vgpr12_vgpr1318    ; GFX7-NEXT: {{  $}}19    ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr020    ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr021    ; GFX7-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr122    ; GFX7-NEXT: [[COPY3:%[0-9]+]]:vreg_64 = COPY $vgpr3_vgpr423    ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_64 = COPY $sgpr10_sgpr1124    ; GFX7-NEXT: [[COPY5:%[0-9]+]]:vreg_64 = COPY $vgpr10_vgpr1125    ; GFX7-NEXT: [[COPY6:%[0-9]+]]:vreg_64 = COPY $vgpr12_vgpr1326    ; GFX7-NEXT: %7:vgpr_32 = nofpexcept V_MAX_F32_e64 0, [[COPY1]], 0, [[COPY]], 0, 0, implicit $mode, implicit $exec27    ; GFX7-NEXT: %8:vgpr_32 = nofpexcept V_MAX_F32_e64 0, [[COPY]], 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec28    ; GFX7-NEXT: %9:vgpr_32 = nofpexcept V_MAX_F32_e64 0, [[COPY1]], 0, [[COPY2]], 0, 0, implicit $mode, implicit $exec29    ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY3]], %7, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 1)30    ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY3]], %8, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 1)31    ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY3]], %9, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 1)32    ; GFX7-NEXT: %10:vreg_64 = nofpexcept V_MAX_F64_e64 0, [[COPY4]], 0, [[COPY5]], 0, 0, implicit $mode, implicit $exec33    ; GFX7-NEXT: %11:vreg_64 = nofpexcept V_MAX_F64_e64 0, [[COPY5]], 0, [[COPY4]], 0, 0, implicit $mode, implicit $exec34    ; GFX7-NEXT: %12:vreg_64 = nofpexcept V_MAX_F64_e64 0, [[COPY5]], 0, [[COPY6]], 0, 0, implicit $mode, implicit $exec35    ; GFX7-NEXT: S_ENDPGM 0, implicit %10, implicit %11, implicit %1236    %0:sgpr(s32) = COPY $sgpr037    %1:vgpr(s32) = COPY $vgpr038    %2:vgpr(s32) = COPY $vgpr139    %3:vgpr(p1) = COPY $vgpr3_vgpr440 41    %10:sgpr(s64) = COPY $sgpr10_sgpr1142    %11:vgpr(s64) = COPY $vgpr10_vgpr1143    %12:vgpr(s64) = COPY $vgpr12_vgpr1344 45    ; maxnum_ieee vs46    %4:vgpr(s32) = G_FMAXNUM_IEEE %1, %047 48    ; maxnum_ieee sv49    %5:vgpr(s32) = G_FMAXNUM_IEEE %0, %150 51    ; maxnum_ieee vv52    %6:vgpr(s32) = G_FMAXNUM_IEEE %1, %253 54    G_STORE %4, %3 :: (store (s32), addrspace 1)55    G_STORE %5, %3 :: (store (s32), addrspace 1)56    G_STORE %6, %3 :: (store (s32), addrspace 1)57 58    ; 64-bit59 60    ; maxnum_ieee vs61    %14:vgpr(s64) = G_FMAXNUM_IEEE %10, %1162 63    ; maxnum_ieee sv64    %15:vgpr(s64) = G_FMAXNUM_IEEE %11, %1065 66    ; maxnum_ieee vv67    %16:vgpr(s64) = G_FMAXNUM_IEEE %11, %1268 69    S_ENDPGM 0, implicit %14, implicit %15, implicit %1670...71 72 73# FIXME: Ideally this would fail to select with ieee mode disabled74---75 76name: fmaxnum_ieee_f32_f64_ieee_mode_off77legalized:       true78regBankSelected: true79machineFunctionInfo:80  mode:81    ieee: false82 83body: |84  bb.0:85    liveins: $sgpr0, $vgpr0, $vgpr1, $vgpr3_vgpr4, $sgpr10_sgpr11, $vgpr10_vgpr11, $vgpr12_vgpr1386    ; GFX7-LABEL: name: fmaxnum_ieee_f32_f64_ieee_mode_off87    ; GFX7: liveins: $sgpr0, $vgpr0, $vgpr1, $vgpr3_vgpr4, $sgpr10_sgpr11, $vgpr10_vgpr11, $vgpr12_vgpr1388    ; GFX7-NEXT: {{  $}}89    ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr090    ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr091    ; GFX7-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr192    ; GFX7-NEXT: [[COPY3:%[0-9]+]]:vreg_64 = COPY $vgpr3_vgpr493    ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_64 = COPY $sgpr10_sgpr1194    ; GFX7-NEXT: [[COPY5:%[0-9]+]]:vreg_64 = COPY $vgpr10_vgpr1195    ; GFX7-NEXT: [[COPY6:%[0-9]+]]:vreg_64 = COPY $vgpr12_vgpr1396    ; GFX7-NEXT: %7:vgpr_32 = nofpexcept V_MAX_F32_e64 0, [[COPY1]], 0, [[COPY]], 0, 0, implicit $mode, implicit $exec97    ; GFX7-NEXT: %8:vgpr_32 = nofpexcept V_MAX_F32_e64 0, [[COPY]], 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec98    ; GFX7-NEXT: %9:vgpr_32 = nofpexcept V_MAX_F32_e64 0, [[COPY1]], 0, [[COPY2]], 0, 0, implicit $mode, implicit $exec99    ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY3]], %7, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 1)100    ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY3]], %8, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 1)101    ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY3]], %9, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 1)102    ; GFX7-NEXT: %10:vreg_64 = nofpexcept V_MAX_F64_e64 0, [[COPY4]], 0, [[COPY5]], 0, 0, implicit $mode, implicit $exec103    ; GFX7-NEXT: %11:vreg_64 = nofpexcept V_MAX_F64_e64 0, [[COPY5]], 0, [[COPY4]], 0, 0, implicit $mode, implicit $exec104    ; GFX7-NEXT: %12:vreg_64 = nofpexcept V_MAX_F64_e64 0, [[COPY5]], 0, [[COPY6]], 0, 0, implicit $mode, implicit $exec105    ; GFX7-NEXT: S_ENDPGM 0, implicit %10, implicit %11, implicit %12106    %0:sgpr(s32) = COPY $sgpr0107    %1:vgpr(s32) = COPY $vgpr0108    %2:vgpr(s32) = COPY $vgpr1109    %3:vgpr(p1) = COPY $vgpr3_vgpr4110 111    %10:sgpr(s64) = COPY $sgpr10_sgpr11112    %11:vgpr(s64) = COPY $vgpr10_vgpr11113    %12:vgpr(s64) = COPY $vgpr12_vgpr13114 115    ; maxnum_ieee vs116    %4:vgpr(s32) = G_FMAXNUM_IEEE %1, %0117 118    ; maxnum_ieee sv119    %5:vgpr(s32) = G_FMAXNUM_IEEE %0, %1120 121    ; maxnum_ieee vv122    %6:vgpr(s32) = G_FMAXNUM_IEEE %1, %2123 124    G_STORE %4, %3 :: (store (s32), addrspace 1)125    G_STORE %5, %3 :: (store (s32), addrspace 1)126    G_STORE %6, %3 :: (store (s32), addrspace 1)127 128    ; 64-bit129 130    ; maxnum_ieee vs131    %14:vgpr(s64) = G_FMAXNUM_IEEE %10, %11132 133    ; maxnum_ieee sv134    %15:vgpr(s64) = G_FMAXNUM_IEEE %11, %10135 136    ; maxnum_ieee vv137    %16:vgpr(s64) = G_FMAXNUM_IEEE %11, %12138 139    S_ENDPGM 0, implicit %14, implicit %15, implicit %16140...141