@@ -1342,7 +1342,6 @@ emit_vector_create_elementwise (
1342
1342
// optimizations can be enabled. This includes recognizing partial constants
1343
1343
// and only performing the minimal number of inserts required
1344
1344
1345
- gboolean all_const = true;
1346
1345
gboolean some_const = false;
1347
1346
1348
1347
guint8 cns_vec [16 ];
@@ -1352,10 +1351,8 @@ emit_vector_create_elementwise (
1352
1351
if (vector_size == 16 ) {
1353
1352
for (int i = 0 ; i < param_count ; ++ i ) {
1354
1353
if (!is_const (args [i ])) {
1355
- all_const = false;
1356
- break ;
1354
+ continue ;
1357
1355
}
1358
-
1359
1356
some_const = true;
1360
1357
1361
1358
if (type_enum_is_float (etype -> type )) {
@@ -1418,10 +1415,6 @@ emit_vector_create_elementwise (
1418
1415
}
1419
1416
}
1420
1417
1421
- if (all_const ) {
1422
- return emit_xconst_v128 (cfg , vklass , (guint8 * )cns_vec );
1423
- }
1424
-
1425
1418
MonoInst * ins ;
1426
1419
1427
1420
if (some_const ) {
@@ -1431,11 +1424,11 @@ emit_vector_create_elementwise (
1431
1424
}
1432
1425
1433
1426
for (int i = 0 ; i < param_count ; ++ i ) {
1434
- if (! is_const (args [i ]) || ( vector_size != 16 )) {
1435
- ins = emit_vector_insert_element ( cfg , vklass , ins , etype -> type , args [ i ], i , TRUE) ;
1427
+ if (some_const && is_const (args [i ])) {
1428
+ continue ;
1436
1429
}
1430
+ ins = emit_vector_insert_element (cfg , vklass , ins , etype -> type , args [i ], i , TRUE);
1437
1431
}
1438
-
1439
1432
return ins ;
1440
1433
}
1441
1434
@@ -1484,8 +1477,7 @@ emit_vector_create_scalar (
1484
1477
} else {
1485
1478
g_assert (arg0 -> opcode == OP_I8CONST );
1486
1479
cns_val = arg0 -> inst_l ;
1487
-
1488
- }
1480
+ }
1489
1481
switch (etype -> type ) {
1490
1482
case MONO_TYPE_I1 :
1491
1483
case MONO_TYPE_U1 : {
0 commit comments