1
1
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2
2
# 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
3
5
4
6
---
5
7
name : ffloor_s16_ss
@@ -19,6 +21,15 @@ body: |
19
21
; VI-NEXT: [[FFLOOR:%[0-9]+]]:sreg_32(s16) = G_FFLOOR [[TRUNC]]
20
22
; VI-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FFLOOR]](s16)
21
23
; 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)
22
33
%0:sgpr(s32) = COPY $sgpr0
23
34
%1:sgpr(s16) = G_TRUNC %0
24
35
%2:sgpr(s16) = G_FFLOOR %1
@@ -40,8 +51,24 @@ body: |
40
51
; VI: liveins: $vgpr0
41
52
; VI-NEXT: {{ $}}
42
53
; 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_]]
45
72
%0:vgpr(s32) = COPY $vgpr0
46
73
%1:vgpr(s16) = G_TRUNC %0
47
74
%2:vgpr(s16) = G_FFLOOR %1
@@ -63,8 +90,23 @@ body: |
63
90
; VI: liveins: $sgpr0
64
91
; VI-NEXT: {{ $}}
65
92
; 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_]]
68
110
%0:sgpr(s32) = COPY $sgpr0
69
111
%1:sgpr(s16) = G_TRUNC %0
70
112
%2:vgpr(s16) = G_FFLOOR %1
@@ -86,8 +128,24 @@ body: |
86
128
; VI: liveins: $vgpr0
87
129
; VI-NEXT: {{ $}}
88
130
; 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_]]
91
149
%0:vgpr(s32) = COPY $vgpr0
92
150
%1:vgpr(s16) = G_TRUNC %0
93
151
%2:vgpr(s16) = G_FNEG %1
0 commit comments