summaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-23 01:47:15 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-23 01:47:15 +0000
commitdeb45e60c5d20511ce95faabaa561f37de456233 (patch)
tree9a9a00d58f04db6271d584b59eabb2dfcba59012 /gcc/simplify-rtx.c
parent0d0922ab8ac42bb802ea9fee9bcc200962d99853 (diff)
downloadgcc-deb45e60c5d20511ce95faabaa561f37de456233.tar.gz
PR optimization/13821
* simplify-rtx.c (simplify_subreg): Use subreg_lowpart_offset to correctly calculate the lowpart offset of the contracted subreg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 5ba6882e680..cebbf04b460 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -3404,8 +3404,9 @@ simplify_subreg (enum machine_mode outermode, rtx op,
if (outermode == origmode)
return XEXP (op, 0);
if (GET_MODE_BITSIZE (outermode) <= GET_MODE_BITSIZE (origmode))
- return simplify_gen_subreg (outermode, XEXP (op, 0),
- origmode, byte);
+ return simplify_gen_subreg (outermode, XEXP (op, 0), origmode,
+ subreg_lowpart_offset (outermode,
+ origmode));
if (SCALAR_INT_MODE_P (outermode))
return simplify_gen_unary (GET_CODE (op), outermode,
XEXP (op, 0), origmode);