summaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-25 21:11:32 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-25 21:11:32 +0000
commit8e63f6ce43800a0aca2958f08bb7afb630ecaa75 (patch)
treef23474a4079ad669c404a6250463d5ebed00ad76 /gcc/simplify-rtx.c
parent1011a9ca98952b1fff364a3350b9372a7ef340b0 (diff)
downloadgcc-8e63f6ce43800a0aca2958f08bb7afb630ecaa75.tar.gz
PR debug/44610
* simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base address if the offset is unknown. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161413 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index be63198e442..3a30e882907 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -208,10 +208,11 @@ avoid_constant_pool_reference (rtx x)
rtx
delegitimize_mem_from_attrs (rtx x)
{
+ /* MEMs without MEM_OFFSETs may have been offset, so we can't just
+ use their base addresses as equivalent. */
if (MEM_P (x)
&& MEM_EXPR (x)
- && (!MEM_OFFSET (x)
- || GET_CODE (MEM_OFFSET (x)) == CONST_INT))
+ && MEM_OFFSET (x))
{
tree decl = MEM_EXPR (x);
enum machine_mode mode = GET_MODE (x);
@@ -264,8 +265,7 @@ delegitimize_mem_from_attrs (rtx x)
{
rtx newx;
- if (MEM_OFFSET (x))
- offset += INTVAL (MEM_OFFSET (x));
+ offset += INTVAL (MEM_OFFSET (x));
newx = DECL_RTL (decl);