Commit 24adb18f by Ira Rosen Committed by Ira Rosen

re PR tree-optimization/40254 (SPEC2006 403.gcc miscompares)


	PR tree-optimization/40254
	* tree-data-ref.c (dr_analyze_innermost): Take POFFSET into account
	in analysis of basic blocks.

From-SVN: r147945
parent 2c5bfdf7
2009-05-28 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/40254
* tree-data-ref.c (dr_analyze_innermost): Take POFFSET into account
in analysis of basic blocks.
2009-05-28 Adam Nemet <anemet@caviumnetworks.com>
PR middle-end/33699
......
2009-05-28 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/40254
* gcc.dg/vect/pr40254.c: New test.
2009-05-28 Adam Nemet <anemet@caviumnetworks.com>
PR middle-end/33699
......
#include <stdlib.h>
#include <stdarg.h>
#include "tree-vect.h"
struct s
{
int *x;
int x1;
int x2;
int x3;
int *y;
};
struct s arr[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
__attribute__ ((noinline)) void
foo (int i, int *in_x, int *in_y)
{
arr[i].x = in_x;
arr[i].y = in_y;
}
int
main (void)
{
int a, b;
check_vect ();
foo (5, &a, &b);
if (arr[5].x != &a || arr[5].y != &b)
abort ();
return 0;
}
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -718,17 +718,26 @@ dr_analyze_innermost (struct data_reference *dr)
base_iv.no_overflow = true;
}
if (!poffset || !in_loop)
if (!poffset)
{
offset_iv.base = ssize_int (0);
offset_iv.step = ssize_int (0);
}
else if (!simple_iv (loop, loop_containing_stmt (stmt),
poffset, &offset_iv, false))
else
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of offset is not affine.\n");
return false;
if (!in_loop)
{
offset_iv.base = poffset;
offset_iv.step = ssize_int (0);
}
else if (!simple_iv (loop, loop_containing_stmt (stmt),
poffset, &offset_iv, false))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of offset is not"
" affine.\n");
return false;
}
}
init = ssize_int (pbitpos / BITS_PER_UNIT);
......
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