diff options
| author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-16 15:43:55 +0000 |
|---|---|---|
| committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-16 15:43:55 +0000 |
| commit | 969e79dd8baa13b773be8d67f678d45ec1ba247d (patch) | |
| tree | f038cfee770b1c497ce8981dc1822218658b02ee | |
| parent | d979f66fd7d31107cf612cd466e6c89c8c565bc0 (diff) | |
| download | ppe42-gcc-969e79dd8baa13b773be8d67f678d45ec1ba247d.tar.gz ppe42-gcc-969e79dd8baa13b773be8d67f678d45ec1ba247d.zip | |
* expmed.c (expand_mult): Write REG_EQUAL note with proper mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38306 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/expmed.c | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d5829766f3..3a5637adf76 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Sat Dec 16 10:41:11 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * expmed.c (expand_mult): Write REG_EQUAL note with proper mode. + 2000-12-16 Neil Booth <neil@daikokuya.demon.co.uk> * tradcpp.c: T_WARNING: New. diff --git a/gcc/expmed.c b/gcc/expmed.c index af5d36d6de1..351dfe4e7ff 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2401,6 +2401,7 @@ expand_mult (mode, op0, op1, target, unsignedp) /* We found something cheaper than a multiply insn. */ int opno; rtx accum, tem; + enum machine_mode nmode; op0 = protect_from_queue (op0, 0); @@ -2505,12 +2506,21 @@ expand_mult (mode, op0, op1, target, unsignedp) } /* Write a REG_EQUAL note on the last insn so that we can cse - multiplication sequences. */ + multiplication sequences. Note that if ACCUM is a SUBREG, + we've set the inner register and must properly indicate + that. */ + + tem = op0, nmode = mode; + if (GET_CODE (accum) == SUBREG) + { + nmode = GET_MODE (SUBREG_REG (accum)); + tem = gen_lowpart (nmode, op0); + } insn = get_last_insn (); set_unique_reg_note (insn, REG_EQUAL, - gen_rtx_MULT (mode, op0, + gen_rtx_MULT (nmode, tem, GEN_INT (val_so_far))); } |

