Commit 5c5f2d4
[ARM] Add a tail-predication loop predicate register
The semantics of tail predication loops means that the value of LR as an
instruction is executed determines the predicate. In other words:
mov r3, #3
DLSTP lr, r3 // Start tail predication, lr==3
VADD.s32 q0, q1, q2 // Lanes 0,1 and 2 are updated in q0.
mov lr, #1
VADD.s32 q0, q1, q2 // Only first lane is updated.
This means that the value of lr cannot be spilled and re-used in tail
predication regions without potentially altering the behaviour of the
program. More lanes than required could be stored, for example, and in
the case of a gather those lanes might not have been setup, leading to
alignment exceptions.
This patch adds a new lr predicate operand to MVE instructions in order
to keep a reference to the lr that they use as a tail predicate. It will
usually hold the zeroreg meaning not predicated, being set to the LR phi
value in the MVETPAndVPTOptimisationsPass. This will prevent it from
being spilled anywhere that it needs to be used.
A lot of tests needed updating.
Differential Revision: https://reviews.llvm.org/D1076381 parent 7e4990b commit 5c5f2d4
File tree
105 files changed
+2833
-2753
lines changed- llvm
- lib
- CodeGen
- Target/ARM
- AsmParser
- Disassembler
- test/CodeGen
- ARM
- Thumb2
- LowOverheadLoops
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
105 files changed
+2833
-2753
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1653 | 1653 | | |
1654 | 1654 | | |
1655 | 1655 | | |
| 1656 | + | |
| 1657 | + | |
1656 | 1658 | | |
1657 | 1659 | | |
1658 | 1660 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| 870 | + | |
870 | 871 | | |
871 | 872 | | |
872 | 873 | | |
| |||
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
| 882 | + | |
881 | 883 | | |
882 | 884 | | |
883 | 885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1822 | 1822 | | |
1823 | 1823 | | |
1824 | 1824 | | |
1825 | | - | |
1826 | | - | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1827 | 1830 | | |
1828 | 1831 | | |
1829 | 1832 | | |
| |||
2529 | 2532 | | |
2530 | 2533 | | |
2531 | 2534 | | |
| 2535 | + | |
2532 | 2536 | | |
2533 | 2537 | | |
2534 | 2538 | | |
| |||
2537 | 2541 | | |
2538 | 2542 | | |
2539 | 2543 | | |
| 2544 | + | |
2540 | 2545 | | |
2541 | 2546 | | |
2542 | 2547 | | |
2543 | 2548 | | |
2544 | 2549 | | |
2545 | 2550 | | |
2546 | 2551 | | |
| 2552 | + | |
2547 | 2553 | | |
2548 | 2554 | | |
2549 | 2555 | | |
2550 | 2556 | | |
2551 | 2557 | | |
2552 | 2558 | | |
2553 | 2559 | | |
| 2560 | + | |
2554 | 2561 | | |
2555 | 2562 | | |
2556 | 2563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11542 | 11542 | | |
11543 | 11543 | | |
11544 | 11544 | | |
| 11545 | + | |
11545 | 11546 | | |
11546 | 11547 | | |
11547 | 11548 | | |
| |||
11560 | 11561 | | |
11561 | 11562 | | |
11562 | 11563 | | |
11563 | | - | |
| 11564 | + | |
| 11565 | + | |
11564 | 11566 | | |
11565 | 11567 | | |
11566 | 11568 | | |
| |||
11570 | 11572 | | |
11571 | 11573 | | |
11572 | 11574 | | |
11573 | | - | |
| 11575 | + | |
| 11576 | + | |
11574 | 11577 | | |
11575 | 11578 | | |
11576 | 11579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
| 622 | + | |
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
| 630 | + | |
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
| 648 | + | |
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
0 commit comments