diff options
author | Olivier Hainque <hainque@adacore.com> | 2012-06-28 07:56:40 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2012-06-28 07:56:40 +0000 |
commit | ecd49d513b49e83434723815d2cf0fab4f328280 (patch) | |
tree | 46944d76395ac668b80f580398d3ed5da26fd2fe /gcc/expr.c | |
parent | e07b233d2e7b2add3e3ca6564ad4f8295e8a8cb6 (diff) | |
download | gcc-ecd49d513b49e83434723815d2cf0fab4f328280.zip gcc-ecd49d513b49e83434723815d2cf0fab4f328280.tar.gz gcc-ecd49d513b49e83434723815d2cf0fab4f328280.tar.bz2 |
expr.c (convert_move): Latch mem integer inputs into a register before expanding a multi-instructions...
* expr.c (convert_move): Latch mem integer inputs into a
register before expanding a multi-instructions sequence.
From-SVN: r189040
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -520,10 +520,13 @@ convert_move (rtx to, rtx from, int unsignedp) /* No special multiword conversion insn; do it by hand. */ start_sequence (); - /* Since we will turn this into a no conflict block, we must ensure - that the source does not overlap the target. */ + /* Since we will turn this into a no conflict block, we must ensure the + the source does not overlap the target so force it into an isolated + register when maybe so. Likewise for any MEM input, since the + conversion sequence might require several references to it and we + must ensure we're getting the same value every time. */ - if (reg_overlap_mentioned_p (to, from)) + if (MEM_P (from) || reg_overlap_mentioned_p (to, from)) from = force_reg (from_mode, from); /* Get a copy of FROM widened to a word, if necessary. */ |