summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-02 22:07:29 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-02 22:07:29 +0000
commitc9d595cef8d1d1b0677b0b3d5e9d5482b43ffc77 (patch)
tree04d584e03506b2591f14368fcdc5c2b03335fc1e /gcc
parent88f55321c655c64c54402318675b2d138a5718e4 (diff)
downloadppe42-gcc-c9d595cef8d1d1b0677b0b3d5e9d5482b43ffc77.tar.gz
ppe42-gcc-c9d595cef8d1d1b0677b0b3d5e9d5482b43ffc77.zip
* expmed.c (store_bit_field): Use simplify_gen_subreg to make
SUBREG so we avoid SUBREGing memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46721 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expmed.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c2c619f3d3c..986b0d0886f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-02 Aldy Hernandez <aldyh@redhat.com>
+
+ * expmed.c (store_bit_field): Use simplify_gen_subreg to make
+ SUBREG so we avoid SUBREGing memory.
+
2001-11-02 DJ Delorie <dj@redhat.com>
* config/rs6000/rs6000.c (rs6000_emit_move): Make sure that
diff --git a/gcc/expmed.c b/gcc/expmed.c
index b08a8c60c46..10c514164fe 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -638,12 +638,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size)
if we must narrow it, be sure we do it correctly. */
if (GET_MODE_SIZE (GET_MODE (value)) < GET_MODE_SIZE (maxmode))
- {
- /* Avoid making subreg of a subreg, or of a mem. */
- if (GET_CODE (value1) != REG)
- value1 = copy_to_reg (value1);
- value1 = gen_rtx_SUBREG (maxmode, value1, 0);
- }
+ value1 = simplify_gen_subreg (maxmode, value1, GET_MODE (value1), 0);
else
value1 = gen_lowpart (maxmode, value1);
}
OpenPOWER on IntegriCloud