1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=WAVE64 %s
3# RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=WAVE32 %s
4
5---
6name: uitofp_s32_to_s32_vv
7legalized: true
8regBankSelected: true
9tracksRegLiveness: true
10
11body: |
12  bb.0:
13    liveins: $vgpr0
14
15    ; WAVE64-LABEL: name: uitofp_s32_to_s32_vv
16    ; WAVE64: liveins: $vgpr0
17    ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
18    ; WAVE64: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
19    ; WAVE64: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
20    ; WAVE32-LABEL: name: uitofp_s32_to_s32_vv
21    ; WAVE32: liveins: $vgpr0
22    ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
23    ; WAVE32: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
24    ; WAVE32: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
25    %0:vgpr(s32) = COPY $vgpr0
26    %1:vgpr(s32) = G_UITOFP %0
27    $vgpr0 = COPY %1
28...
29
30---
31name: uitofp_s32_to_s32_vs
32legalized: true
33regBankSelected: true
34tracksRegLiveness: true
35
36body: |
37  bb.0:
38    liveins: $sgpr0
39
40    ; WAVE64-LABEL: name: uitofp_s32_to_s32_vs
41    ; WAVE64: liveins: $sgpr0
42    ; WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
43    ; WAVE64: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
44    ; WAVE64: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
45    ; WAVE32-LABEL: name: uitofp_s32_to_s32_vs
46    ; WAVE32: liveins: $sgpr0
47    ; WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
48    ; WAVE32: [[V_CVT_F32_U32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e64 [[COPY]], 0, 0, implicit $mode, implicit $exec
49    ; WAVE32: $vgpr0 = COPY [[V_CVT_F32_U32_e64_]]
50    %0:sgpr(s32) = COPY $sgpr0
51    %1:vgpr(s32) = G_UITOFP %0
52    $vgpr0 = COPY %1
53...
54
55---
56name: uitofp_s32_to_s16_vv
57legalized: true
58regBankSelected: true
59tracksRegLiveness: true
60
61body: |
62  bb.0:
63    liveins: $vgpr0
64
65    ; WAVE64-LABEL: name: uitofp_s32_to_s16_vv
66    ; WAVE64: liveins: $vgpr0
67    ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
68    ; WAVE64: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
69    ; WAVE64: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 [[V_CVT_F32_U32_e32_]], implicit $mode, implicit $exec
70    ; WAVE64: $vgpr0 = COPY %1
71    ; WAVE32-LABEL: name: uitofp_s32_to_s16_vv
72    ; WAVE32: liveins: $vgpr0
73    ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
74    ; WAVE32: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
75    ; WAVE32: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 [[V_CVT_F32_U32_e32_]], implicit $mode, implicit $exec
76    ; WAVE32: $vgpr0 = COPY %1
77    %0:vgpr(s32) = COPY $vgpr0
78    %1:vgpr(s16) = G_UITOFP %0
79    %2:vgpr(s32) = G_ANYEXT %1
80    $vgpr0 = COPY %2
81...
82
83---
84name: uitofp_s32_to_s16_vs
85legalized: true
86regBankSelected: true
87tracksRegLiveness: true
88
89body: |
90  bb.0:
91    liveins: $sgpr0
92
93    ; WAVE64-LABEL: name: uitofp_s32_to_s16_vs
94    ; WAVE64: liveins: $sgpr0
95    ; WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
96    ; WAVE64: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
97    ; WAVE64: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 [[V_CVT_F32_U32_e32_]], implicit $mode, implicit $exec
98    ; WAVE64: $vgpr0 = COPY %1
99    ; WAVE32-LABEL: name: uitofp_s32_to_s16_vs
100    ; WAVE32: liveins: $sgpr0
101    ; WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
102    ; WAVE32: [[V_CVT_F32_U32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_U32_e32 [[COPY]], implicit $mode, implicit $exec
103    ; WAVE32: %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 [[V_CVT_F32_U32_e32_]], implicit $mode, implicit $exec
104    ; WAVE32: $vgpr0 = COPY %1
105    %0:sgpr(s32) = COPY $sgpr0
106    %1:vgpr(s16) = G_UITOFP %0
107    %2:vgpr(s32) = G_ANYEXT %1
108    $vgpr0 = COPY %2
109...
110