Commit 5451971
committed
[AArch64][GlobalISel] Add a constant funnel shift post-legalizer combine.
We want to be able to produce extr instructions post-legalization. They are
legal for scalars, acting as a funnel shifts with a constant shift amount.
Unfortunately I'm not sure if there is a way currently to represent that in the
legalization rules, but it might be useful for several operations - to be able
to treat and test operands with constant operands as legal or not.
This adds a change to the existing matchOrShiftToFunnelShift so that AArch64
can generate such instructions post-legalization providing that the operation
is scalar and the shift amount is constant. It doesn't feel like the best
solution - any thoughts on alternatives?1 parent a1e59bd commit 5451971
File tree
8 files changed
+341
-393
lines changed- llvm
- include/llvm
- CodeGen/GlobalISel
- Target/GlobalISel
- lib
- CodeGen/GlobalISel
- Target/AArch64
- test/CodeGen/AArch64
8 files changed
+341
-393
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
| 643 | + | |
| 644 | + | |
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | | - | |
| 1016 | + | |
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1020 | 1028 | | |
1021 | 1029 | | |
1022 | 1030 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4425 | 4425 | | |
4426 | 4426 | | |
4427 | 4427 | | |
| 4428 | + | |
4428 | 4429 | | |
4429 | 4430 | | |
4430 | 4431 | | |
| |||
4444 | 4445 | | |
4445 | 4446 | | |
4446 | 4447 | | |
4447 | | - | |
| 4448 | + | |
4448 | 4449 | | |
4449 | 4450 | | |
4450 | 4451 | | |
4451 | 4452 | | |
4452 | 4453 | | |
4453 | | - | |
4454 | 4454 | | |
4455 | 4455 | | |
4456 | 4456 | | |
4457 | 4457 | | |
4458 | 4458 | | |
4459 | | - | |
4460 | 4459 | | |
4461 | 4460 | | |
4462 | 4461 | | |
4463 | 4462 | | |
4464 | 4463 | | |
4465 | | - | |
4466 | 4464 | | |
4467 | 4465 | | |
4468 | 4466 | | |
4469 | 4467 | | |
4470 | 4468 | | |
4471 | | - | |
| 4469 | + | |
| 4470 | + | |
4472 | 4471 | | |
4473 | 4472 | | |
4474 | 4473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
371 | 372 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
112 | | - | |
| 110 | + | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
0 commit comments