diff options
author | Matthew Fortune <matthew.fortune@imgtec.com> | 2017-02-20 12:06:56 +0000 |
---|---|---|
committer | Matthew Fortune <mpf@gcc.gnu.org> | 2017-02-20 12:06:56 +0000 |
commit | 222aafd7b63a3d79a80c55efefae7b52953be5b4 (patch) | |
tree | 297a2427fc6d4fd2cd6d7e1579c9500c577630d9 /gcc | |
parent | dc42a736c9c76adf6b9e98cf121d37c7f64e607b (diff) | |
download | gcc-222aafd7b63a3d79a80c55efefae7b52953be5b4.zip gcc-222aafd7b63a3d79a80c55efefae7b52953be5b4.tar.gz gcc-222aafd7b63a3d79a80c55efefae7b52953be5b4.tar.bz2 |
Handle WORD_REGISTER_OPERATIONS when reloading (subreg (reg))
gcc/
PR target/78660
* lra-constraints.c (curr_insn_transform): Handle
WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
From-SVN: r245598
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f72bb1c..9dc6b58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com> + + PR target/78660 + * lra-constraints.c (curr_insn_transform): Handle + WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs. + 2017-02-19 Uros Bizjak <ubizjak@gmail.com> Revert: diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 0098a75..62947e3 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -4130,7 +4130,15 @@ curr_insn_transform (bool check_only_p) && (goal_alt[i] == NO_REGS || (simplify_subreg_regno (ira_class_hard_regs[goal_alt[i]][0], - GET_MODE (reg), byte, mode) >= 0))))) + GET_MODE (reg), byte, mode) >= 0))) + /* WORD_REGISTER_OPERATIONS targets require the register + to be reloaded when the outer mode is strictly + narrower than the inner mode. Note: It may be + necessary to always reload the inner mode here but it + requires further investigation. */ + || (GET_MODE_PRECISION (mode) + < GET_MODE_PRECISION (GET_MODE (reg)) + && WORD_REGISTER_OPERATIONS))) { if (type == OP_OUT) type = OP_INOUT; |