aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index b08a8c6..10c5141 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);
}