Commit 3a28db46 by Uros Bizjak

re PR middle-end/68999 (FAIL: gfortran.fortran-torture/execute/save_1.f90 execution)

	PR middle-end/68999
	* alias.c (base_alias_check): Move check for addresses with
	alignment ANDs before the call for compare_base_decls.
	(memrefs_conflict_p): Return -1 for different decls
	that went through alignment adjustments.

From-SVN: r232229
parent 2b8568fe
2016-01-11 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/68999
* alias.c (base_alias_check): Move check for addresses with
alignment ANDs before the call for compare_base_decls.
(memrefs_conflict_p): Return -1 for different decls
that went through alignment adjustments.
2016-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2016-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/68796 PR rtl-optimization/68796
...@@ -8,12 +16,11 @@ ...@@ -8,12 +16,11 @@
2016-01-11 H.J. Lu <hongjiu.lu@intel.com> 2016-01-11 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/sse.md (<avx512>_load<mode>_mask): Remove * config/i386/sse.md (<avx512>_load<mode>_mask): Remove snprintf.
snprintf.
(<avx512>_store<mode>_mask): Likewise. (<avx512>_store<mode>_mask): Likewise.
2016-01-11 Bernd Schmidt <bschmidt@redhat.com> 2016-01-11 Bernd Schmidt <bschmidt@redhat.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com> Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/68841 PR rtl-optimization/68841
* ifcvt.c (struct noce_if_info): Add orig_x field. * ifcvt.c (struct noce_if_info): Add orig_x field.
......
...@@ -2093,17 +2093,6 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base, ...@@ -2093,17 +2093,6 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base,
if (rtx_equal_p (x_base, y_base)) if (rtx_equal_p (x_base, y_base))
return 1; return 1;
if (GET_CODE (x_base) == SYMBOL_REF && GET_CODE (y_base) == SYMBOL_REF)
{
tree x_decl = SYMBOL_REF_DECL (x_base);
tree y_decl = SYMBOL_REF_DECL (y_base);
/* We can assume that no stores are made to labels. */
if (!x_decl || !y_decl)
return 0;
return compare_base_decls (x_decl, y_decl) != 0;
}
/* The base addresses are different expressions. If they are not accessed /* The base addresses are different expressions. If they are not accessed
via AND, there is no conflict. We can bring knowledge of object via AND, there is no conflict. We can bring knowledge of object
alignment into play here. For example, on alpha, "char a, b;" can alignment into play here. For example, on alpha, "char a, b;" can
...@@ -2122,6 +2111,17 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base, ...@@ -2122,6 +2111,17 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base,
|| (int) GET_MODE_UNIT_SIZE (x_mode) < -INTVAL (XEXP (y, 1)))) || (int) GET_MODE_UNIT_SIZE (x_mode) < -INTVAL (XEXP (y, 1))))
return 1; return 1;
if (GET_CODE (x_base) == SYMBOL_REF && GET_CODE (y_base) == SYMBOL_REF)
{
tree x_decl = SYMBOL_REF_DECL (x_base);
tree y_decl = SYMBOL_REF_DECL (y_base);
/* We can assume that no stores are made to labels. */
if (!x_decl || !y_decl)
return 0;
return compare_base_decls (x_decl, y_decl) != 0;
}
/* Differing symbols not accessed via AND never alias. */ /* Differing symbols not accessed via AND never alias. */
if (GET_CODE (x_base) != ADDRESS && GET_CODE (y_base) != ADDRESS) if (GET_CODE (x_base) != ADDRESS && GET_CODE (y_base) != ADDRESS)
return 0; return 0;
...@@ -2344,6 +2344,12 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) ...@@ -2344,6 +2344,12 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
/* If both decls are the same, decide by offsets. */ /* If both decls are the same, decide by offsets. */
if (cmp == 1) if (cmp == 1)
return offset_overlap_p (c, xsize, ysize); return offset_overlap_p (c, xsize, ysize);
/* Assume a potential overlap for symbolic addresses that went
through alignment adjustments (i.e., that have negative
sizes), because we can't know how far they are from each
other. */
if (xsize < 0 || ysize < 0)
return -1;
/* If decls are different or we know by offsets that there is no overlap, /* If decls are different or we know by offsets that there is no overlap,
we win. */ we win. */
if (!cmp || !offset_overlap_p (c, xsize, ysize)) if (!cmp || !offset_overlap_p (c, xsize, ysize))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment