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
8 tracksRegLiveness: true
14 ; GCN-LABEL: name: frint_s16_ss
15 ; GCN: liveins: $sgpr0
17 ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
18 ; GCN-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
19 ; GCN-NEXT: [[FRINT:%[0-9]+]]:sreg_32(s16) = G_FRINT [[TRUNC]]
20 ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FRINT]](s16)
21 ; GCN-NEXT: $sgpr0 = COPY [[COPY1]](s32)
22 %0:sgpr(s32) = COPY $sgpr0
23 %1:sgpr(s16) = G_TRUNC %0
24 %2:sgpr(s16) = G_FRINT %1
25 %3:sgpr(s32) = G_ANYEXT %2
33 tracksRegLiveness: true
39 ; GCN-LABEL: name: frint_s16_vv
40 ; GCN: liveins: $vgpr0
42 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
43 ; GCN-NEXT: %2:vgpr_32 = nofpexcept V_RNDNE_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
44 ; GCN-NEXT: $vgpr0 = COPY %2
45 %0:vgpr(s32) = COPY $vgpr0
46 %1:vgpr(s16) = G_TRUNC %0
47 %2:vgpr(s16) = G_FRINT %1
48 %3:vgpr(s32) = G_ANYEXT %2
56 tracksRegLiveness: true
62 ; GCN-LABEL: name: frint_s16_vs
63 ; GCN: liveins: $sgpr0
65 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
66 ; GCN-NEXT: %2:vgpr_32 = nofpexcept V_RNDNE_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
67 ; GCN-NEXT: $vgpr0 = COPY %2
68 %0:sgpr(s32) = COPY $sgpr0
69 %1:sgpr(s16) = G_TRUNC %0
70 %2:vgpr(s16) = G_FRINT %1
71 %3:vgpr(s32) = G_ANYEXT %2
76 name: frint_fneg_s16_vv
79 tracksRegLiveness: true
85 ; GCN-LABEL: name: frint_fneg_s16_vv
86 ; GCN: liveins: $vgpr0
88 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
89 ; GCN-NEXT: %3:vgpr_32 = nofpexcept V_RNDNE_F16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
90 ; GCN-NEXT: $vgpr0 = COPY %3
91 %0:vgpr(s32) = COPY $vgpr0
92 %1:vgpr(s16) = G_TRUNC %0
93 %2:vgpr(s16) = G_FNEG %1
94 %3:vgpr(s16) = G_FRINT %2
95 %4:vgpr(s32) = G_ANYEXT %3