Commit a035cf1
committed
arc: emit clobber of CC for -mcpu=em x >> 31
Address the issue explained here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120375
Devices without a barrel shifter end up using a sequence of
instructions. These can use the condition codes and/or loop count
register, so those need to be marked as 'clobbered'. These clobbers were
previously added only after split1, which is too late. This patch adds
these clobbers from the beginning, in the define_expand.
Previously, define_insn_and_split *<insn>si3_nobs would match any shift or
rotate instruction and would generate the necessary patterns to emulate a
barrel shifter, but it did not have any output assembly for itself.
In many cases this would create a loop with parallel clobbers. This pattern
is then matched by the <insn>si3_loop pattern.
Now, these are combined in define_insn_and_split <insn>si3_loop that is
explicitly emitted in the define_expand and already contains the clobbers.
This can then be split into another pattern or remain the loop pattern.
Regtested for arc.
Signed-off-by: Loeka Rogge <[email protected]>1 parent ef2d980 commit a035cf1
File tree
2 files changed
+54
-25
lines changed- gcc
- config/arc
- testsuite/gcc.target/arc
2 files changed
+54
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3554 | 3554 | | |
3555 | 3555 | | |
3556 | 3556 | | |
3557 | | - | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
3558 | 3565 | | |
3559 | 3566 | | |
3560 | 3567 | | |
| |||
3653 | 3660 | | |
3654 | 3661 | | |
3655 | 3662 | | |
3656 | | - | |
3657 | | - | |
3658 | | - | |
3659 | | - | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
3660 | 3669 | | |
3661 | | - | |
3662 | | - | |
3663 | | - | |
3664 | | - | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
3665 | 3673 | | |
3666 | 3674 | | |
3667 | 3675 | | |
3668 | 3676 | | |
3669 | | - | |
3670 | | - | |
3671 | | - | |
3672 | | - | |
3673 | | - | |
3674 | | - | |
3675 | | - | |
3676 | | - | |
3677 | | - | |
3678 | | - | |
3679 | | - | |
3680 | | - | |
3681 | | - | |
3682 | | - | |
3683 | | - | |
3684 | | - | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
3685 | 3680 | | |
3686 | 3681 | | |
3687 | 3682 | | |
| |||
6413 | 6408 | | |
6414 | 6409 | | |
6415 | 6410 | | |
| 6411 | + | |
| 6412 | + | |
| 6413 | + | |
| 6414 | + | |
| 6415 | + | |
| 6416 | + | |
| 6417 | + | |
| 6418 | + | |
| 6419 | + | |
| 6420 | + | |
| 6421 | + | |
| 6422 | + | |
| 6423 | + | |
| 6424 | + | |
| 6425 | + | |
6416 | 6426 | | |
6417 | 6427 | | |
6418 | 6428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments