@@ -1437,3 +1437,67 @@ define void @extractelement_fp(i32 %x) {
1437
1437
1438
1438
ret void
1439
1439
}
1440
+
1441
+
1442
+ define void @extractelement_int_nonpoweroftwo (i32 %x ) {
1443
+ ; RV32V-LABEL: 'extractelement_int_nonpoweroftwo'
1444
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8 = extractelement <3 x i8> undef, i32 %x
1445
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i8 = extractelement <7 x i8> undef, i32 %x
1446
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i8 = extractelement <15 x i8> undef, i32 %x
1447
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i8 = extractelement <31 x i8> undef, i32 %x
1448
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i32 = extractelement <3 x i32> undef, i32 %x
1449
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i32 = extractelement <7 x i32> undef, i32 %x
1450
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i32 = extractelement <15 x i32> undef, i32 %x
1451
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32 = extractelement <31 x i32> undef, i32 %x
1452
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32_0 = extractelement <31 x i32> undef, i32 0
1453
+ ; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1454
+ ;
1455
+ ; RV64V-LABEL: 'extractelement_int_nonpoweroftwo'
1456
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8 = extractelement <3 x i8> undef, i32 %x
1457
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i8 = extractelement <7 x i8> undef, i32 %x
1458
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i8 = extractelement <15 x i8> undef, i32 %x
1459
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i8 = extractelement <31 x i8> undef, i32 %x
1460
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i32 = extractelement <3 x i32> undef, i32 %x
1461
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i32 = extractelement <7 x i32> undef, i32 %x
1462
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i32 = extractelement <15 x i32> undef, i32 %x
1463
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32 = extractelement <31 x i32> undef, i32 %x
1464
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32_0 = extractelement <31 x i32> undef, i32 0
1465
+ ; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1466
+ ;
1467
+ ; RV32ZVE64X-LABEL: 'extractelement_int_nonpoweroftwo'
1468
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8 = extractelement <3 x i8> undef, i32 %x
1469
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i8 = extractelement <7 x i8> undef, i32 %x
1470
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i8 = extractelement <15 x i8> undef, i32 %x
1471
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i8 = extractelement <31 x i8> undef, i32 %x
1472
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i32 = extractelement <3 x i32> undef, i32 %x
1473
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i32 = extractelement <7 x i32> undef, i32 %x
1474
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i32 = extractelement <15 x i32> undef, i32 %x
1475
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32 = extractelement <31 x i32> undef, i32 %x
1476
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32_0 = extractelement <31 x i32> undef, i32 0
1477
+ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1478
+ ;
1479
+ ; RV64ZVE64X-LABEL: 'extractelement_int_nonpoweroftwo'
1480
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8 = extractelement <3 x i8> undef, i32 %x
1481
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i8 = extractelement <7 x i8> undef, i32 %x
1482
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i8 = extractelement <15 x i8> undef, i32 %x
1483
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i8 = extractelement <31 x i8> undef, i32 %x
1484
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i32 = extractelement <3 x i32> undef, i32 %x
1485
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7i32 = extractelement <7 x i32> undef, i32 %x
1486
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15i32 = extractelement <15 x i32> undef, i32 %x
1487
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32 = extractelement <31 x i32> undef, i32 %x
1488
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v31i32_0 = extractelement <31 x i32> undef, i32 0
1489
+ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1490
+ ;
1491
+ %v3i8 = extractelement <3 x i8 > undef , i32 %x
1492
+ %v7i8 = extractelement <7 x i8 > undef , i32 %x
1493
+ %v15i8 = extractelement <15 x i8 > undef , i32 %x
1494
+ %v31i8 = extractelement <31 x i8 > undef , i32 %x
1495
+
1496
+ %v3i32 = extractelement <3 x i32 > undef , i32 %x
1497
+ %v7i32 = extractelement <7 x i32 > undef , i32 %x
1498
+ %v15i32 = extractelement <15 x i32 > undef , i32 %x
1499
+ %v31i32 = extractelement <31 x i32 > undef , i32 %x
1500
+ %v31i32_0 = extractelement <31 x i32 > undef , i32 0
1501
+
1502
+ ret void
1503
+ }
0 commit comments