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 -o - %s | FileCheck %s -check-prefix=GCN
5 name: fptosi_s32_to_s32_vv
8 tracksRegLiveness: true
14 ; GCN-LABEL: name: fptosi_s32_to_s32_vv
15 ; GCN: liveins: $vgpr0
16 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
17 ; GCN: [[V_CVT_I32_F32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_I32_F32_e64 0, [[COPY]], 0, 0, implicit $exec
18 ; GCN: $vgpr0 = COPY [[V_CVT_I32_F32_e64_]]
19 %0:vgpr(s32) = COPY $vgpr0
20 %1:vgpr(s32) = G_FPTOSI %0
25 name: fptosi_s32_to_s32_vs
28 tracksRegLiveness: true
34 ; GCN-LABEL: name: fptosi_s32_to_s32_vs
35 ; GCN: liveins: $sgpr0
36 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
37 ; GCN: [[V_CVT_I32_F32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_I32_F32_e64 0, [[COPY]], 0, 0, implicit $exec
38 ; GCN: $vgpr0 = COPY [[V_CVT_I32_F32_e64_]]
39 %0:sgpr(s32) = COPY $sgpr0
40 %1:vgpr(s32) = G_FPTOSI %0
45 name: fptosi_s32_to_s32_fneg_vv
48 tracksRegLiveness: true
54 ; GCN-LABEL: name: fptosi_s32_to_s32_fneg_vv
55 ; GCN: liveins: $vgpr0
56 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
57 ; GCN: [[V_CVT_I32_F32_e64_:%[0-9]+]]:vgpr_32 = V_CVT_I32_F32_e64 1, [[COPY]], 0, 0, implicit $exec
58 ; GCN: $vgpr0 = COPY [[V_CVT_I32_F32_e64_]]
59 %0:vgpr(s32) = COPY $vgpr0
60 %1:vgpr(s32) = G_FNEG %0
61 %2:vgpr(s32) = G_FPTOSI %1
66 name: fptosi_s16_to_s32_vv
69 tracksRegLiveness: true
75 ; GCN-LABEL: name: fptosi_s16_to_s32_vv
76 ; GCN: liveins: $vgpr0
77 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
78 ; GCN: [[V_CVT_F32_F16_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_F16_e32 [[COPY]], implicit $exec
79 ; GCN: [[V_CVT_I32_F32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_I32_F32_e32 [[V_CVT_F32_F16_e32_]], implicit $exec
80 ; GCN: $vgpr0 = COPY [[V_CVT_I32_F32_e32_]]
81 %0:vgpr(s32) = COPY $vgpr0
82 %1:vgpr(s16) = G_TRUNC %0
83 %2:vgpr(s32) = G_FPTOSI %1
88 name: fptosi_s16_to_s32_vs
91 tracksRegLiveness: true
97 ; GCN-LABEL: name: fptosi_s16_to_s32_vs
98 ; GCN: liveins: $sgpr0
99 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
100 ; GCN: [[V_CVT_F32_F16_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_F16_e32 [[COPY]], implicit $exec
101 ; GCN: [[V_CVT_I32_F32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_I32_F32_e32 [[V_CVT_F32_F16_e32_]], implicit $exec
102 ; GCN: $vgpr0 = COPY [[V_CVT_I32_F32_e32_]]
103 %0:sgpr(s32) = COPY $sgpr0
104 %1:sgpr(s16) = G_TRUNC %0
105 %2:vgpr(s32) = G_FPTOSI %1
110 name: fptosi_s16_to_s32_fneg_vv
112 regBankSelected: true
113 tracksRegLiveness: true
119 ; GCN-LABEL: name: fptosi_s16_to_s32_fneg_vv
120 ; GCN: liveins: $vgpr0
121 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
122 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
123 ; GCN: [[V_XOR_B32_e32_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e32 [[S_MOV_B32_]], [[COPY]], implicit $exec
124 ; GCN: [[V_CVT_F32_F16_e32_:%[0-9]+]]:vgpr_32 = V_CVT_F32_F16_e32 [[V_XOR_B32_e32_]], implicit $exec
125 ; GCN: [[V_CVT_I32_F32_e32_:%[0-9]+]]:vgpr_32 = V_CVT_I32_F32_e32 [[V_CVT_F32_F16_e32_]], implicit $exec
126 ; GCN: $vgpr0 = COPY [[V_CVT_I32_F32_e32_]]
127 %0:vgpr(s32) = COPY $vgpr0
128 %1:vgpr(s16) = G_TRUNC %0
129 %2:vgpr(s16) = G_FNEG %1
130 %3:vgpr(s32) = G_FPTOSI %2