@@ -1175,4 +1175,54 @@ define void @sitofp_16i8_16f32() #0 {
1175
1175
ret void
1176
1176
}
1177
1177
1178
+ ;
1179
+ ; SITOFP BUILDVECTOR
1180
+ ;
1181
+
1182
+ define <4 x double > @sitofp_4xi32_4f64 (i32 %a0 , i32 %a1 , i32 %a2 , i32 %a3 ) #0 {
1183
+ ; CHECK-LABEL: @sitofp_4xi32_4f64(
1184
+ ; CHECK-NEXT: [[CVT0:%.*]] = sitofp i32 %a0 to double
1185
+ ; CHECK-NEXT: [[CVT1:%.*]] = sitofp i32 %a1 to double
1186
+ ; CHECK-NEXT: [[CVT2:%.*]] = sitofp i32 %a2 to double
1187
+ ; CHECK-NEXT: [[CVT3:%.*]] = sitofp i32 %a3 to double
1188
+ ; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x double> undef, double [[CVT0]], i32 0
1189
+ ; CHECK-NEXT: [[RES1:%.*]] = insertelement <4 x double> [[RES0]], double [[CVT1]], i32 1
1190
+ ; CHECK-NEXT: [[RES2:%.*]] = insertelement <4 x double> [[RES1]], double [[CVT2]], i32 2
1191
+ ; CHECK-NEXT: [[RES3:%.*]] = insertelement <4 x double> [[RES2]], double [[CVT3]], i32 3
1192
+ ; CHECK-NEXT: ret <4 x double> [[RES3]]
1193
+ ;
1194
+ %cvt0 = sitofp i32 %a0 to double
1195
+ %cvt1 = sitofp i32 %a1 to double
1196
+ %cvt2 = sitofp i32 %a2 to double
1197
+ %cvt3 = sitofp i32 %a3 to double
1198
+ %res0 = insertelement <4 x double > undef , double %cvt0 , i32 0
1199
+ %res1 = insertelement <4 x double > %res0 , double %cvt1 , i32 1
1200
+ %res2 = insertelement <4 x double > %res1 , double %cvt2 , i32 2
1201
+ %res3 = insertelement <4 x double > %res2 , double %cvt3 , i32 3
1202
+ ret <4 x double > %res3
1203
+ }
1204
+
1205
+ define <4 x float > @sitofp_4xi32_4f32 (i32 %a0 , i32 %a1 , i32 %a2 , i32 %a3 ) #0 {
1206
+ ; CHECK-LABEL: @sitofp_4xi32_4f32(
1207
+ ; CHECK-NEXT: [[CVT0:%.*]] = sitofp i32 %a0 to float
1208
+ ; CHECK-NEXT: [[CVT1:%.*]] = sitofp i32 %a1 to float
1209
+ ; CHECK-NEXT: [[CVT2:%.*]] = sitofp i32 %a2 to float
1210
+ ; CHECK-NEXT: [[CVT3:%.*]] = sitofp i32 %a3 to float
1211
+ ; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x float> undef, float [[CVT0]], i32 0
1212
+ ; CHECK-NEXT: [[RES1:%.*]] = insertelement <4 x float> [[RES0]], float [[CVT1]], i32 1
1213
+ ; CHECK-NEXT: [[RES2:%.*]] = insertelement <4 x float> [[RES1]], float [[CVT2]], i32 2
1214
+ ; CHECK-NEXT: [[RES3:%.*]] = insertelement <4 x float> [[RES2]], float [[CVT3]], i32 3
1215
+ ; CHECK-NEXT: ret <4 x float> [[RES3]]
1216
+ ;
1217
+ %cvt0 = sitofp i32 %a0 to float
1218
+ %cvt1 = sitofp i32 %a1 to float
1219
+ %cvt2 = sitofp i32 %a2 to float
1220
+ %cvt3 = sitofp i32 %a3 to float
1221
+ %res0 = insertelement <4 x float > undef , float %cvt0 , i32 0
1222
+ %res1 = insertelement <4 x float > %res0 , float %cvt1 , i32 1
1223
+ %res2 = insertelement <4 x float > %res1 , float %cvt2 , i32 2
1224
+ %res3 = insertelement <4 x float > %res2 , float %cvt3 , i32 3
1225
+ ret <4 x float > %res3
1226
+ }
1227
+
1178
1228
attributes #0 = { nounwind }
0 commit comments