1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s 3 4--- 5name: frint_s16_ss 6legalized: true 7regBankSelected: true 8tracksRegLiveness: true 9 10body: | 11 bb.0: 12 liveins: $sgpr0 13 14 ; GCN-LABEL: name: frint_s16_ss 15 ; GCN: liveins: $sgpr0 16 ; GCN: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 17 ; GCN: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32) 18 ; GCN: [[FRINT:%[0-9]+]]:sreg_32(s16) = G_FRINT [[TRUNC]] 19 ; GCN: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FRINT]](s16) 20 ; GCN: $sgpr0 = COPY [[COPY1]](s32) 21 %0:sgpr(s32) = COPY $sgpr0 22 %1:sgpr(s16) = G_TRUNC %0 23 %2:sgpr(s16) = G_FRINT %1 24 %3:sgpr(s32) = G_ANYEXT %2 25 $sgpr0 = COPY %3 26... 27 28--- 29name: frint_s16_vv 30legalized: true 31regBankSelected: true 32tracksRegLiveness: true 33 34body: | 35 bb.0: 36 liveins: $vgpr0 37 38 ; GCN-LABEL: name: frint_s16_vv 39 ; GCN: liveins: $vgpr0 40 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 41 ; GCN: %2:vgpr_32 = nofpexcept V_RNDNE_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec 42 ; GCN: $vgpr0 = COPY %2 43 %0:vgpr(s32) = COPY $vgpr0 44 %1:vgpr(s16) = G_TRUNC %0 45 %2:vgpr(s16) = G_FRINT %1 46 %3:vgpr(s32) = G_ANYEXT %2 47 $vgpr0 = COPY %3 48... 49 50--- 51name: frint_s16_vs 52legalized: true 53regBankSelected: true 54tracksRegLiveness: true 55 56body: | 57 bb.0: 58 liveins: $sgpr0 59 60 ; GCN-LABEL: name: frint_s16_vs 61 ; GCN: liveins: $sgpr0 62 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 63 ; GCN: %2:vgpr_32 = nofpexcept V_RNDNE_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec 64 ; GCN: $vgpr0 = COPY %2 65 %0:sgpr(s32) = COPY $sgpr0 66 %1:sgpr(s16) = G_TRUNC %0 67 %2:vgpr(s16) = G_FRINT %1 68 %3:vgpr(s32) = G_ANYEXT %2 69 $vgpr0 = COPY %3 70... 71 72--- 73name: frint_fneg_s16_vv 74legalized: true 75regBankSelected: true 76tracksRegLiveness: true 77 78body: | 79 bb.0: 80 liveins: $vgpr0 81 82 ; GCN-LABEL: name: frint_fneg_s16_vv 83 ; GCN: liveins: $vgpr0 84 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 85 ; GCN: %3:vgpr_32 = nofpexcept V_RNDNE_F16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec 86 ; GCN: $vgpr0 = COPY %3 87 %0:vgpr(s32) = COPY $vgpr0 88 %1:vgpr(s16) = G_TRUNC %0 89 %2:vgpr(s16) = G_FNEG %1 90 %3:vgpr(s16) = G_FRINT %2 91 %4:vgpr(s32) = G_ANYEXT %3 92 $vgpr0 = COPY %4 93... 94