1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=WAVE64 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=WAVE32 %s
4 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX11 %s
7 name: uitofp_s32_to_s32_vv
10 tracksRegLiveness: true
16 ; WAVE64-LABEL: name: uitofp_s32_to_s32_vv
17 ; WAVE64: liveins: $vgpr0
19 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
20 ; WAVE64-NEXT: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
21 ; WAVE64-NEXT: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
22 ; WAVE32-LABEL: name: uitofp_s32_to_s32_vv
23 ; WAVE32: liveins: $vgpr0
25 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
26 ; WAVE32-NEXT: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
27 ; WAVE32-NEXT: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
28 ; GFX11-LABEL: name: uitofp_s32_to_s32_vv
29 ; GFX11: liveins: $vgpr0
31 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
32 ; GFX11-NEXT: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
33 ; GFX11-NEXT: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
34 %0:vgpr(s32) = COPY $vgpr0
35 %1:vgpr(s32) = G_UITOFP %0
40 name: uitofp_s32_to_s32_vs
43 tracksRegLiveness: true
49 ; WAVE64-LABEL: name: uitofp_s32_to_s32_vs
50 ; WAVE64: liveins: $sgpr0
52 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
53 ; WAVE64-NEXT: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
54 ; WAVE64-NEXT: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
55 ; WAVE32-LABEL: name: uitofp_s32_to_s32_vs
56 ; WAVE32: liveins: $sgpr0
58 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
59 ; WAVE32-NEXT: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
60 ; WAVE32-NEXT: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
61 ; GFX11-LABEL: name: uitofp_s32_to_s32_vs
62 ; GFX11: liveins: $sgpr0
64 ; GFX11-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
65 ; GFX11-NEXT: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
66 ; GFX11-NEXT: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
67 %0:sgpr(s32) = COPY $sgpr0
68 %1:vgpr(s32) = G_UITOFP %0
73 name: uitofp_s32_to_s16_vv
76 tracksRegLiveness: true
82 ; WAVE64-LABEL: name: uitofp_s32_to_s16_vv
83 ; WAVE64: liveins: $vgpr0
85 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
86 ; WAVE64-NEXT: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
87 ; WAVE64-NEXT: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e64 0, [[V_CVT_F32_U32_e32_]], 0, 0, implicit $mode, implicit $exec
88 ; WAVE64-NEXT: $vgpr0 = COPY %1
89 ; WAVE32-LABEL: name: uitofp_s32_to_s16_vv
90 ; WAVE32: liveins: $vgpr0
92 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
93 ; WAVE32-NEXT: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
94 ; WAVE32-NEXT: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e64 0, [[V_CVT_F32_U32_e32_]], 0, 0, implicit $mode, implicit $exec
95 ; WAVE32-NEXT: $vgpr0 = COPY %1
96 ; GFX11-LABEL: name: uitofp_s32_to_s16_vv
97 ; GFX11: liveins: $vgpr0
99 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
100 ; GFX11-NEXT: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
101 ; GFX11-NEXT: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_t16_e64 0, [[V_CVT_F32_U32_e32_]], 0, 0, implicit $mode, implicit $exec
102 ; GFX11-NEXT: $vgpr0 = COPY %1
103 %0:vgpr(s32) = COPY $vgpr0
104 %1:vgpr(s16) = G_UITOFP %0
105 %2:vgpr(s32) = G_ANYEXT %1
110 name: uitofp_s32_to_s16_vs
112 regBankSelected: true
113 tracksRegLiveness: true
119 ; WAVE64-LABEL: name: uitofp_s32_to_s16_vs
120 ; WAVE64: liveins: $sgpr0
121 ; WAVE64-NEXT: {{ $}}
122 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
123 ; WAVE64-NEXT: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
124 ; WAVE64-NEXT: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e64 0, [[V_CVT_F32_U32_e32_]], 0, 0, implicit $mode, implicit $exec
125 ; WAVE64-NEXT: $vgpr0 = COPY %1
126 ; WAVE32-LABEL: name: uitofp_s32_to_s16_vs
127 ; WAVE32: liveins: $sgpr0
128 ; WAVE32-NEXT: {{ $}}
129 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
130 ; WAVE32-NEXT: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
131 ; WAVE32-NEXT: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e64 0, [[V_CVT_F32_U32_e32_]], 0, 0, implicit $mode, implicit $exec
132 ; WAVE32-NEXT: $vgpr0 = COPY %1
133 ; GFX11-LABEL: name: uitofp_s32_to_s16_vs
134 ; GFX11: liveins: $sgpr0
136 ; GFX11-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
137 ; GFX11-NEXT: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
138 ; GFX11-NEXT: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_t16_e64 0, [[V_CVT_F32_U32_e32_]], 0, 0, implicit $mode, implicit $exec
139 ; GFX11-NEXT: $vgpr0 = COPY %1
140 %0:sgpr(s32) = COPY $sgpr0
141 %1:vgpr(s16) = G_UITOFP %0
142 %2:vgpr(s32) = G_ANYEXT %1