Commit 1f1fef1
committed
[RISCV] Combine vmerge_vl allones -> vmv_v_v, vmv_v_v splat(x) -> vmv_v_x
Stacked on #170536
An upcoming patch aims to remove the last use of @llvm.experimental.vp.splat in RISCVCodegenPrepare by replacing it with a vp_merge of a regular splat.
A vp_merge will get lowered to vmerge_vl, and if we combine vmerge_vl of a splat to vmv_v_x we can get the same behaviour as the vp.splat intrinsic.
This adds the two combines needed. It was easier to do the combines on _vl nodes rather than on vp_merge itself, since the types are already legal for _vl nodes.1 parent 4ed47cb commit 1f1fef1
File tree
3 files changed
+47
-21
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
3 files changed
+47
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21872 | 21872 | | |
21873 | 21873 | | |
21874 | 21874 | | |
| 21875 | + | |
| 21876 | + | |
| 21877 | + | |
| 21878 | + | |
| 21879 | + | |
| 21880 | + | |
| 21881 | + | |
| 21882 | + | |
| 21883 | + | |
| 21884 | + | |
| 21885 | + | |
| 21886 | + | |
| 21887 | + | |
| 21888 | + | |
| 21889 | + | |
| 21890 | + | |
| 21891 | + | |
| 21892 | + | |
| 21893 | + | |
| 21894 | + | |
| 21895 | + | |
| 21896 | + | |
| 21897 | + | |
| 21898 | + | |
| 21899 | + | |
| 21900 | + | |
| 21901 | + | |
| 21902 | + | |
| 21903 | + | |
| 21904 | + | |
| 21905 | + | |
| 21906 | + | |
| 21907 | + | |
| 21908 | + | |
| 21909 | + | |
| 21910 | + | |
| 21911 | + | |
| 21912 | + | |
21875 | 21913 | | |
21876 | 21914 | | |
21877 | 21915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1357 | 1357 | | |
1358 | 1358 | | |
1359 | 1359 | | |
1360 | | - | |
1361 | | - | |
1362 | 1360 | | |
1363 | | - | |
| 1361 | + | |
1364 | 1362 | | |
1365 | 1363 | | |
1366 | 1364 | | |
| |||
1371 | 1369 | | |
1372 | 1370 | | |
1373 | 1371 | | |
1374 | | - | |
1375 | | - | |
1376 | 1372 | | |
1377 | | - | |
| 1373 | + | |
1378 | 1374 | | |
1379 | 1375 | | |
1380 | 1376 | | |
| |||
1385 | 1381 | | |
1386 | 1382 | | |
1387 | 1383 | | |
1388 | | - | |
1389 | | - | |
1390 | 1384 | | |
1391 | | - | |
| 1385 | + | |
1392 | 1386 | | |
1393 | 1387 | | |
1394 | 1388 | | |
| |||
1397 | 1391 | | |
1398 | 1392 | | |
1399 | 1393 | | |
1400 | | - | |
1401 | | - | |
1402 | 1394 | | |
1403 | 1395 | | |
1404 | | - | |
| 1396 | + | |
1405 | 1397 | | |
1406 | 1398 | | |
1407 | 1399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
1671 | | - | |
1672 | | - | |
| 1671 | + | |
1673 | 1672 | | |
1674 | 1673 | | |
1675 | 1674 | | |
| |||
1681 | 1680 | | |
1682 | 1681 | | |
1683 | 1682 | | |
1684 | | - | |
1685 | | - | |
| 1683 | + | |
1686 | 1684 | | |
1687 | 1685 | | |
1688 | 1686 | | |
| |||
1694 | 1692 | | |
1695 | 1693 | | |
1696 | 1694 | | |
1697 | | - | |
1698 | | - | |
| 1695 | + | |
1699 | 1696 | | |
1700 | 1697 | | |
1701 | 1698 | | |
| |||
1704 | 1701 | | |
1705 | 1702 | | |
1706 | 1703 | | |
| 1704 | + | |
1707 | 1705 | | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
| 1706 | + | |
1711 | 1707 | | |
1712 | 1708 | | |
1713 | 1709 | | |
| |||
0 commit comments