diff options
Diffstat (limited to 'contrib/gcc/alias.c')
-rw-r--r-- | contrib/gcc/alias.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/gcc/alias.c b/contrib/gcc/alias.c index 15f2d7b..db9dc07 100644 --- a/contrib/gcc/alias.c +++ b/contrib/gcc/alias.c @@ -1935,6 +1935,14 @@ nonoverlapping_memrefs_p (x, y) moffsetx = adjust_offset_for_component_ref (exprx, moffsetx); exprx = t; } + else if (TREE_CODE (exprx) == INDIRECT_REF) + { + exprx = TREE_OPERAND (exprx, 0); + if (flag_argument_noalias < 2 + || TREE_CODE (exprx) != PARM_DECL) + return 0; + } + moffsety = MEM_OFFSET (y); if (TREE_CODE (expry) == COMPONENT_REF) { @@ -1944,6 +1952,13 @@ nonoverlapping_memrefs_p (x, y) moffsety = adjust_offset_for_component_ref (expry, moffsety); expry = t; } + else if (TREE_CODE (expry) == INDIRECT_REF) + { + expry = TREE_OPERAND (expry, 0); + if (flag_argument_noalias < 2 + || TREE_CODE (expry) != PARM_DECL) + return 0; + } if (! DECL_P (exprx) || ! DECL_P (expry)) return 0; @@ -2012,7 +2027,7 @@ nonoverlapping_memrefs_p (x, y) /* If we don't know the size of the lower-offset value, we can't tell if they conflict. Otherwise, we do the test. */ - return sizex >= 0 && offsety > offsetx + sizex; + return sizex >= 0 && offsety >= offsetx + sizex; } /* True dependence: X is read after store in MEM takes place. */ |