Commit 3cfdf2c
authored
[RISCV] Handle more (add x, C) -> (sub x, -C) cases (llvm#138705)
This is a follow-up to llvm#137309, adding:
- multi-use of the constant with different adds
- vectors (vadd.vx -> vsub.vx)1 parent adfd59f commit 3cfdf2c
File tree
9 files changed
+95
-23
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
- rvv
9 files changed
+95
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3223 | 3223 | | |
3224 | 3224 | | |
3225 | 3225 | | |
3226 | | - | |
| 3226 | + | |
3227 | 3227 | | |
3228 | 3228 | | |
3229 | 3229 | | |
3230 | 3230 | | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
3231 | 3248 | | |
3232 | 3249 | | |
3233 | 3250 | | |
| |||
3630 | 3647 | | |
3631 | 3648 | | |
3632 | 3649 | | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
3633 | 3655 | | |
3634 | 3656 | | |
3635 | 3657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6232 | 6232 | | |
6233 | 6233 | | |
6234 | 6234 | | |
| 6235 | + | |
| 6236 | + | |
| 6237 | + | |
| 6238 | + | |
| 6239 | + | |
| 6240 | + | |
| 6241 | + | |
| 6242 | + | |
| 6243 | + | |
| 6244 | + | |
| 6245 | + | |
| 6246 | + | |
| 6247 | + | |
| 6248 | + | |
| 6249 | + | |
| 6250 | + | |
| 6251 | + | |
| 6252 | + | |
| 6253 | + | |
| 6254 | + | |
| 6255 | + | |
| 6256 | + | |
| 6257 | + | |
| 6258 | + | |
| 6259 | + | |
| 6260 | + | |
| 6261 | + | |
| 6262 | + | |
| 6263 | + | |
| 6264 | + | |
6235 | 6265 | | |
6236 | 6266 | | |
6237 | 6267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
910 | 922 | | |
911 | 923 | | |
912 | 924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
741 | 742 | | |
742 | 743 | | |
743 | 744 | | |
| |||
2122 | 2123 | | |
2123 | 2124 | | |
2124 | 2125 | | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
2125 | 2139 | | |
2126 | 2140 | | |
2127 | 2141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | | - | |
| 455 | + | |
457 | 456 | | |
458 | | - | |
| 457 | + | |
459 | 458 | | |
460 | 459 | | |
461 | 460 | | |
| |||
481 | 480 | | |
482 | 481 | | |
483 | 482 | | |
484 | | - | |
485 | | - | |
| 483 | + | |
486 | 484 | | |
487 | | - | |
| 485 | + | |
488 | 486 | | |
489 | 487 | | |
490 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1445 | 1445 | | |
1446 | 1446 | | |
1447 | 1447 | | |
1448 | | - | |
1449 | | - | |
| 1448 | + | |
1450 | 1449 | | |
1451 | | - | |
| 1450 | + | |
1452 | 1451 | | |
1453 | 1452 | | |
1454 | 1453 | | |
| |||
1473 | 1472 | | |
1474 | 1473 | | |
1475 | 1474 | | |
1476 | | - | |
1477 | | - | |
| 1475 | + | |
1478 | 1476 | | |
1479 | | - | |
| 1477 | + | |
1480 | 1478 | | |
1481 | 1479 | | |
1482 | 1480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
887 | | - | |
888 | | - | |
| 887 | + | |
889 | 888 | | |
890 | | - | |
| 889 | + | |
891 | 890 | | |
892 | 891 | | |
893 | 892 | | |
| |||
911 | 910 | | |
912 | 911 | | |
913 | 912 | | |
914 | | - | |
915 | | - | |
| 913 | + | |
916 | 914 | | |
917 | | - | |
| 915 | + | |
918 | 916 | | |
919 | 917 | | |
920 | 918 | | |
| |||
0 commit comments