Commit 9f215be
committed
[DAGCombiner][RISCV] Add target hook to decide hoisting LogicOp with extension.
This patch introduces a new target hook `isDesirableToHoistLogicOpWithExt`
to allow target to decide hoisting LogicOp where both operands have the
same extension op. By default it returns true.
On RISC-V, (or disjoint (sext/zext a), (sext/zext b)) can be combined as
vwadd.vv/vwaddu.vv. So for such case, it returns false.1 parent 497382e commit 9f215be
File tree
5 files changed
+28
-10
lines changed- llvm
- include/llvm/CodeGen
- lib
- CodeGen/SelectionDAG
- Target/RISCV
- test/CodeGen/RISCV/rvv
5 files changed
+28
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4462 | 4462 | | |
4463 | 4463 | | |
4464 | 4464 | | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
4465 | 4475 | | |
4466 | 4476 | | |
4467 | 4477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5981 | 5981 | | |
5982 | 5982 | | |
5983 | 5983 | | |
| 5984 | + | |
| 5985 | + | |
| 5986 | + | |
5984 | 5987 | | |
5985 | 5988 | | |
5986 | 5989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19893 | 19893 | | |
19894 | 19894 | | |
19895 | 19895 | | |
| 19896 | + | |
| 19897 | + | |
| 19898 | + | |
| 19899 | + | |
| 19900 | + | |
| 19901 | + | |
| 19902 | + | |
| 19903 | + | |
19896 | 19904 | | |
19897 | 19905 | | |
19898 | 19906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
750 | 753 | | |
751 | 754 | | |
752 | 755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
1420 | | - | |
1421 | | - | |
1422 | 1420 | | |
1423 | 1421 | | |
1424 | 1422 | | |
1425 | 1423 | | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
| 1424 | + | |
| 1425 | + | |
1429 | 1426 | | |
1430 | 1427 | | |
1431 | 1428 | | |
1432 | 1429 | | |
1433 | 1430 | | |
1434 | 1431 | | |
1435 | 1432 | | |
1436 | | - | |
1437 | | - | |
1438 | 1433 | | |
1439 | 1434 | | |
1440 | 1435 | | |
1441 | 1436 | | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
| 1437 | + | |
| 1438 | + | |
1445 | 1439 | | |
1446 | 1440 | | |
1447 | 1441 | | |
| |||
0 commit comments