summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-04 09:01:03 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-04 09:01:03 +0000
commitd6af6bc2277b4be75e143a806add564c2b116b84 (patch)
tree70ca7951bbb8dd5d3322110e353693674bfc1df8 /gcc/expr.c
parent93d302144297d18f61298c3e92ab72436fc82322 (diff)
downloadgcc-d6af6bc2277b4be75e143a806add564c2b116b84.tar.gz
PR optimization/14235
* expr.c (convert_move): Copy the source to a new pseudo when converting from a sub-word source to a larger-than-word register which conflicts with the source. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78893 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e2063c1950f..14809498a93 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -682,7 +682,11 @@ convert_move (rtx to, rtx from, int unsignedp)
!= CODE_FOR_nothing))
{
if (GET_CODE (to) == REG)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, to));
+ {
+ if (reg_overlap_mentioned_p (to, from))
+ from = force_reg (from_mode, from);
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, to));
+ }
convert_move (gen_lowpart (word_mode, to), from, unsignedp);
emit_unop_insn (code, to,
gen_lowpart (word_mode, to), equiv_code);