1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck %s -check-prefix=GCN 3 4--- 5 6name: fptoui 7legalized: true 8regBankSelected: true 9 10body: | 11 bb.0: 12 liveins: $sgpr0, $vgpr0, $vgpr3_vgpr4 13 14 ; GCN-LABEL: name: fptoui 15 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 16 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 17 ; GCN: [[COPY2:%[0-9]+]]:vreg_64 = COPY $vgpr3_vgpr4 18 ; GCN: %3:vgpr_32 = nofpexcept V_CVT_U32_F32_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec 19 ; GCN: %4:vgpr_32 = nofpexcept V_CVT_U32_F32_e64 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec 20 ; GCN: FLAT_STORE_DWORD [[COPY2]], %3, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4, addrspace 1) 21 ; GCN: FLAT_STORE_DWORD [[COPY2]], %4, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4, addrspace 1) 22 %0:sgpr(s32) = COPY $sgpr0 23 24 %1:vgpr(s32) = COPY $vgpr0 25 26 %2:vgpr(p1) = COPY $vgpr3_vgpr4 27 28 ; fptoui s 29 %3:vgpr(s32) = G_FPTOUI %0 30 31 ; fptoui v 32 %4:vgpr(s32) = G_FPTOUI %1 33 34 G_STORE %3, %2 :: (store 4, addrspace 1) 35 G_STORE %4, %2 :: (store 4, addrspace 1) 36... 37 38--- 39name: fptoui_s16_to_s32_vv 40legalized: true 41regBankSelected: true 42tracksRegLiveness: true 43 44body: | 45 bb.0: 46 liveins: $vgpr0 47 48 ; GCN-LABEL: name: fptoui_s16_to_s32_vv 49 ; GCN: liveins: $vgpr0 50 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 51 ; GCN: %3:vgpr_32 = nofpexcept V_CVT_F32_F16_e32 [[COPY]], implicit $mode, implicit $exec 52 ; GCN: %2:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 %3, implicit $mode, implicit $exec 53 ; GCN: $vgpr0 = COPY %2 54 %0:vgpr(s32) = COPY $vgpr0 55 %1:vgpr(s16) = G_TRUNC %0 56 %2:vgpr(s32) = G_FPTOUI %1 57 $vgpr0 = COPY %2 58... 59 60--- 61name: fptoui_s16_to_s32_vs 62legalized: true 63regBankSelected: true 64tracksRegLiveness: true 65 66body: | 67 bb.0: 68 liveins: $sgpr0 69 70 ; GCN-LABEL: name: fptoui_s16_to_s32_vs 71 ; GCN: liveins: $sgpr0 72 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 73 ; GCN: %3:vgpr_32 = nofpexcept V_CVT_F32_F16_e32 [[COPY]], implicit $mode, implicit $exec 74 ; GCN: %2:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 %3, implicit $mode, implicit $exec 75 ; GCN: $vgpr0 = COPY %2 76 %0:sgpr(s32) = COPY $sgpr0 77 %1:sgpr(s16) = G_TRUNC %0 78 %2:vgpr(s32) = G_FPTOUI %1 79 $vgpr0 = COPY %2 80... 81 82--- 83name: fptoui_s16_to_s32_fneg_vv 84legalized: true 85regBankSelected: true 86tracksRegLiveness: true 87 88body: | 89 bb.0: 90 liveins: $vgpr0 91 92 ; GCN-LABEL: name: fptoui_s16_to_s32_fneg_vv 93 ; GCN: liveins: $vgpr0 94 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 95 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768 96 ; GCN: [[V_XOR_B32_e32_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e32 [[S_MOV_B32_]], [[COPY]], implicit $exec 97 ; GCN: %4:vgpr_32 = nofpexcept V_CVT_F32_F16_e32 [[V_XOR_B32_e32_]], implicit $mode, implicit $exec 98 ; GCN: %3:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 %4, implicit $mode, implicit $exec 99 ; GCN: $vgpr0 = COPY %3 100 %0:vgpr(s32) = COPY $vgpr0 101 %1:vgpr(s16) = G_TRUNC %0 102 %2:vgpr(s16) = G_FNEG %1 103 %3:vgpr(s32) = G_FPTOUI %2 104 $vgpr0 = COPY %3 105... 106