11# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22# RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=VI %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
35
46---
57name : ffloor_s16_ss
@@ -19,6 +21,15 @@ body: |
1921 ; VI-NEXT: [[FFLOOR:%[0-9]+]]:sreg_32(s16) = G_FFLOOR [[TRUNC]]
2022 ; VI-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FFLOOR]](s16)
2123 ; VI-NEXT: $sgpr0 = COPY [[COPY1]](s32)
24+ ;
25+ ; GCN-LABEL: name: ffloor_s16_ss
26+ ; GCN: liveins: $sgpr0
27+ ; GCN-NEXT: {{ $}}
28+ ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
29+ ; GCN-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
30+ ; GCN-NEXT: [[FFLOOR:%[0-9]+]]:sreg_32(s16) = G_FFLOOR [[TRUNC]]
31+ ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FFLOOR]](s16)
32+ ; GCN-NEXT: $sgpr0 = COPY [[COPY1]](s32)
2233 %0:sgpr(s32) = COPY $sgpr0
2334 %1:sgpr(s16) = G_TRUNC %0
2435 %2:sgpr(s16) = G_FFLOOR %1
@@ -40,8 +51,24 @@ body: |
4051 ; VI: liveins: $vgpr0
4152 ; VI-NEXT: {{ $}}
4253 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
43- ; VI-NEXT: %2:vgpr_32 = nofpexcept V_FLOOR_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
44- ; VI-NEXT: $vgpr0 = COPY %2
54+ ; VI-NEXT: [[V_FLOOR_F16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_FLOOR_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
55+ ; VI-NEXT: $vgpr0 = COPY [[V_FLOOR_F16_e64_]]
56+ ;
57+ ; GFX11-LABEL: name: ffloor_s16_vv
58+ ; GFX11: liveins: $vgpr0
59+ ; GFX11-NEXT: {{ $}}
60+ ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
61+ ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_16 = COPY [[COPY]]
62+ ; GFX11-NEXT: [[V_FLOOR_F16_t16_e64_:%[0-9]+]]:vgpr_16 = nofpexcept V_FLOOR_F16_t16_e64 0, [[COPY1]], 0, 0, implicit $mode, implicit $exec
63+ ; GFX11-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_FLOOR_F16_t16_e64_]]
64+ ; GFX11-NEXT: $vgpr0 = COPY [[COPY2]]
65+ ;
66+ ; GFX11-FAKE16-LABEL: name: ffloor_s16_vv
67+ ; GFX11-FAKE16: liveins: $vgpr0
68+ ; GFX11-FAKE16-NEXT: {{ $}}
69+ ; GFX11-FAKE16-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
70+ ; GFX11-FAKE16-NEXT: [[V_FLOOR_F16_fake16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_FLOOR_F16_fake16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
71+ ; GFX11-FAKE16-NEXT: $vgpr0 = COPY [[V_FLOOR_F16_fake16_e64_]]
4572 %0:vgpr(s32) = COPY $vgpr0
4673 %1:vgpr(s16) = G_TRUNC %0
4774 %2:vgpr(s16) = G_FFLOOR %1
@@ -63,8 +90,23 @@ body: |
6390 ; VI: liveins: $sgpr0
6491 ; VI-NEXT: {{ $}}
6592 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
66- ; VI-NEXT: %2:vgpr_32 = nofpexcept V_FLOOR_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
67- ; VI-NEXT: $vgpr0 = COPY %2
93+ ; VI-NEXT: [[V_FLOOR_F16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_FLOOR_F16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
94+ ; VI-NEXT: $vgpr0 = COPY [[V_FLOOR_F16_e64_]]
95+ ;
96+ ; GFX11-LABEL: name: ffloor_s16_vs
97+ ; GFX11: liveins: $sgpr0
98+ ; GFX11-NEXT: {{ $}}
99+ ; GFX11-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
100+ ; GFX11-NEXT: [[V_FLOOR_F16_t16_e64_:%[0-9]+]]:vgpr_16 = nofpexcept V_FLOOR_F16_t16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
101+ ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[V_FLOOR_F16_t16_e64_]]
102+ ; GFX11-NEXT: $vgpr0 = COPY [[COPY1]]
103+ ;
104+ ; GFX11-FAKE16-LABEL: name: ffloor_s16_vs
105+ ; GFX11-FAKE16: liveins: $sgpr0
106+ ; GFX11-FAKE16-NEXT: {{ $}}
107+ ; GFX11-FAKE16-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
108+ ; GFX11-FAKE16-NEXT: [[V_FLOOR_F16_fake16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_FLOOR_F16_fake16_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
109+ ; GFX11-FAKE16-NEXT: $vgpr0 = COPY [[V_FLOOR_F16_fake16_e64_]]
68110 %0:sgpr(s32) = COPY $sgpr0
69111 %1:sgpr(s16) = G_TRUNC %0
70112 %2:vgpr(s16) = G_FFLOOR %1
@@ -86,8 +128,24 @@ body: |
86128 ; VI: liveins: $vgpr0
87129 ; VI-NEXT: {{ $}}
88130 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
89- ; VI-NEXT: %3:vgpr_32 = nofpexcept V_FLOOR_F16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
90- ; VI-NEXT: $vgpr0 = COPY %3
131+ ; VI-NEXT: [[V_FLOOR_F16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_FLOOR_F16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
132+ ; VI-NEXT: $vgpr0 = COPY [[V_FLOOR_F16_e64_]]
133+ ;
134+ ; GFX11-LABEL: name: ffloor_fneg_s16_vv
135+ ; GFX11: liveins: $vgpr0
136+ ; GFX11-NEXT: {{ $}}
137+ ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
138+ ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_16 = COPY [[COPY]]
139+ ; GFX11-NEXT: [[V_FLOOR_F16_t16_e64_:%[0-9]+]]:vgpr_16 = nofpexcept V_FLOOR_F16_t16_e64 1, [[COPY1]], 0, 0, implicit $mode, implicit $exec
140+ ; GFX11-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_FLOOR_F16_t16_e64_]]
141+ ; GFX11-NEXT: $vgpr0 = COPY [[COPY2]]
142+ ;
143+ ; GFX11-FAKE16-LABEL: name: ffloor_fneg_s16_vv
144+ ; GFX11-FAKE16: liveins: $vgpr0
145+ ; GFX11-FAKE16-NEXT: {{ $}}
146+ ; GFX11-FAKE16-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
147+ ; GFX11-FAKE16-NEXT: [[V_FLOOR_F16_fake16_e64_:%[0-9]+]]:vgpr_32 = nofpexcept V_FLOOR_F16_fake16_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
148+ ; GFX11-FAKE16-NEXT: $vgpr0 = COPY [[V_FLOOR_F16_fake16_e64_]]
91149 %0:vgpr(s32) = COPY $vgpr0
92150 %1:vgpr(s16) = G_TRUNC %0
93151 %2:vgpr(s16) = G_FNEG %1
0 commit comments