1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefixes=GCN,GFX8 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefixes=GCN,GFX11 %s
4 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefixes=GCN,GFX11-FAKE16 %s
10 tracksRegLiveness: true
16 ; GCN-LABEL: name: fceil_s16_ss
17 ; GCN: liveins: $sgpr0
19 ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
20 ; GCN-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
21 ; GCN-NEXT: [[FCEIL:%[0-9]+]]:sreg_32(s16) = G_FCEIL [[TRUNC]]
22 ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FCEIL]](s16)
23 ; GCN-NEXT: $sgpr0 = COPY [[COPY1]](s32)
24 %0:sgpr(s32) = COPY $sgpr0
25 %1:sgpr(s16) = G_TRUNC %0
26 %2:sgpr(s16) = G_FCEIL %1
27 %3:sgpr(s32) = G_ANYEXT %2
35 tracksRegLiveness: true
41 ; GFX8-LABEL: name: fceil_s16_vv
42 ; GFX8: liveins: $vgpr0
44 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
45 ; GFX8-NEXT: [[V_CEIL_F16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_CEIL_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
46 ; GFX8-NEXT: $vgpr0 = COPY [[V_CEIL_F16_e64_]]
48 ; GFX11-LABEL: name: fceil_s16_vv
49 ; GFX11: liveins: $vgpr0
51 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
52 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_16 = COPY [[COPY]]
53 ; GFX11-NEXT: [[V_CEIL_F16_t16_e64_:%[0-9]+]]:vgpr_16 = nofpexcept V_CEIL_F16_t16_e64 0, [[COPY1]], 0, 0, 0, implicit $mode, implicit $exec
54 ; GFX11-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CEIL_F16_t16_e64_]]
55 ; GFX11-NEXT: $vgpr0 = COPY [[COPY2]]
57 ; GFX11-FAKE16-LABEL: name: fceil_s16_vv
58 ; GFX11-FAKE16: liveins: $vgpr0
59 ; GFX11-FAKE16-NEXT: {{ $}}
60 ; GFX11-FAKE16-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
61 ; GFX11-FAKE16-NEXT: [[V_CEIL_F16_fake16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_CEIL_F16_fake16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
62 ; GFX11-FAKE16-NEXT: $vgpr0 = COPY [[V_CEIL_F16_fake16_e64_]]
63 %0:vgpr(s32) = COPY $vgpr0
64 %1:vgpr(s16) = G_TRUNC %0
65 %2:vgpr(s16) = G_FCEIL %1
66 %3:vgpr(s32) = G_ANYEXT %2
74 tracksRegLiveness: true
80 ; GFX8-LABEL: name: fceil_s16_vs
81 ; GFX8: liveins: $sgpr0
83 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
84 ; GFX8-NEXT: [[V_CEIL_F16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_CEIL_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
85 ; GFX8-NEXT: $vgpr0 = COPY [[V_CEIL_F16_e64_]]
87 ; GFX11-LABEL: name: fceil_s16_vs
88 ; GFX11: liveins: $sgpr0
90 ; GFX11-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
91 ; GFX11-NEXT: [[V_CEIL_F16_t16_e64_:%[0-9]+]]:vgpr_16 = nofpexcept V_CEIL_F16_t16_e64 0, [[COPY]], 0, 0, 0, implicit $mode, implicit $exec
92 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[V_CEIL_F16_t16_e64_]]
93 ; GFX11-NEXT: $vgpr0 = COPY [[COPY1]]
95 ; GFX11-FAKE16-LABEL: name: fceil_s16_vs
96 ; GFX11-FAKE16: liveins: $sgpr0
97 ; GFX11-FAKE16-NEXT: {{ $}}
98 ; GFX11-FAKE16-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
99 ; GFX11-FAKE16-NEXT: [[V_CEIL_F16_fake16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_CEIL_F16_fake16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
100 ; GFX11-FAKE16-NEXT: $vgpr0 = COPY [[V_CEIL_F16_fake16_e64_]]
101 %0:sgpr(s32) = COPY $sgpr0
102 %1:sgpr(s16) = G_TRUNC %0
103 %2:vgpr(s16) = G_FCEIL %1
104 %3:vgpr(s32) = G_ANYEXT %2
109 name: fceil_fneg_s16_vv
111 regBankSelected: true
112 tracksRegLiveness: true
118 ; GFX8-LABEL: name: fceil_fneg_s16_vv
119 ; GFX8: liveins: $vgpr0
121 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
122 ; GFX8-NEXT: [[V_CEIL_F16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_CEIL_F16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
123 ; GFX8-NEXT: $vgpr0 = COPY [[V_CEIL_F16_e64_]]
125 ; GFX11-LABEL: name: fceil_fneg_s16_vv
126 ; GFX11: liveins: $vgpr0
128 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
129 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_16 = COPY [[COPY]]
130 ; GFX11-NEXT: [[V_CEIL_F16_t16_e64_:%[0-9]+]]:vgpr_16 = nofpexcept V_CEIL_F16_t16_e64 1, [[COPY1]], 0, 0, 0, implicit $mode, implicit $exec
131 ; GFX11-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CEIL_F16_t16_e64_]]
132 ; GFX11-NEXT: $vgpr0 = COPY [[COPY2]]
134 ; GFX11-FAKE16-LABEL: name: fceil_fneg_s16_vv
135 ; GFX11-FAKE16: liveins: $vgpr0
136 ; GFX11-FAKE16-NEXT: {{ $}}
137 ; GFX11-FAKE16-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
138 ; GFX11-FAKE16-NEXT: [[V_CEIL_F16_fake16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_CEIL_F16_fake16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
139 ; GFX11-FAKE16-NEXT: $vgpr0 = COPY [[V_CEIL_F16_fake16_e64_]]
140 %0:vgpr(s32) = COPY $vgpr0
141 %1:vgpr(s16) = G_TRUNC %0
142 %2:vgpr(s16) = G_FNEG %1
143 %3:vgpr(s16) = G_FCEIL %2
144 %4:vgpr(s32) = G_ANYEXT %3