summaryrefslogtreecommitdiffstats
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-19 01:03:13 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-19 01:03:13 +0000
commitf45da063312a5c9b2226dfd6e1df5f73bbba4f20 (patch)
tree890b4d30ea68b1357366c5208fe59e0d265c722e /gcc/expmed.c
parenteac96366f9ac115b4e4a4eb67355d54d95678545 (diff)
downloadppe42-gcc-f45da063312a5c9b2226dfd6e1df5f73bbba4f20.tar.gz
ppe42-gcc-f45da063312a5c9b2226dfd6e1df5f73bbba4f20.zip
* expmed.c (expand_mult_const): Force operand to constant.
* rs6000.c (rs6000_emit_set_const, rs6000_emit_set_long_const): Add copy_rtx to arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120037 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 29440d1a5db..e12fdfbb103 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2981,10 +2981,9 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val,
int opno;
enum machine_mode nmode;
- /* Avoid referencing memory over and over.
- For speed, but also for correctness when mem is volatile. */
- if (MEM_P (op0))
- op0 = force_reg (mode, op0);
+ /* Avoid referencing memory over and over and invalid sharing
+ on SUBREGs. */
+ op0 = force_reg (mode, op0);
/* ACCUM starts out either as OP0 or as a zero, depending on
the first operation. */
@@ -3095,7 +3094,8 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val,
insn = get_last_insn ();
set_unique_reg_note (insn, REG_EQUAL,
- gen_rtx_MULT (nmode, tem, GEN_INT (val_so_far)));
+ gen_rtx_MULT (nmode, tem,
+ GEN_INT (val_so_far)));
}
if (variant == negate_variant)
OpenPOWER on IntegriCloud