mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/66142 (Loop is not vectorized because not sufficient support for GOMP_SIMD_LANE)
2015-05-26 Richard Biener <rguenther@suse.de> PR tree-optimization/66142 * tree-ssa-sccvn.c (vn_reference_lookup_3): Manually compare MEM_REFs for the same base address. * gcc.dg/tree-ssa/ssa-fre-44.c: New testcase. From-SVN: r223697
This commit is contained in:
parent
bff469f75f
commit
ea3eac3ab7
|
|
@ -1,3 +1,9 @@
|
||||||
|
2015-05-26 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/66142
|
||||||
|
* tree-ssa-sccvn.c (vn_reference_lookup_3): Manually compare
|
||||||
|
MEM_REFs for the same base address.
|
||||||
|
|
||||||
2015-05-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
2015-05-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
||||||
|
|
||||||
PR ipa/66181
|
PR ipa/66181
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-05-26 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/66142
|
||||||
|
* gcc.dg/tree-ssa/ssa-fre-44.c: New testcase.
|
||||||
|
|
||||||
2015-05-26 Paul Thomas <pault@gcc.gnu.org>
|
2015-05-26 Paul Thomas <pault@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/66082
|
PR fortran/66082
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O -fdump-tree-fre1" } */
|
||||||
|
|
||||||
|
struct A { float x, y; };
|
||||||
|
struct B { struct A u; };
|
||||||
|
void bar (struct A *);
|
||||||
|
|
||||||
|
float
|
||||||
|
f1 (struct B *x, int y)
|
||||||
|
{
|
||||||
|
struct A p;
|
||||||
|
p.x = 1.0f;
|
||||||
|
p.y = 2.0f;
|
||||||
|
struct A *q = &x[y].u;
|
||||||
|
*q = p;
|
||||||
|
float f = x[y].u.x + x[y].u.y;
|
||||||
|
bar (&p);
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
f2 (struct B *x, int y)
|
||||||
|
{
|
||||||
|
struct A p;
|
||||||
|
p.x = 1.0f;
|
||||||
|
p.y = 2.0f;
|
||||||
|
x[y].u = p;
|
||||||
|
float f = x[y].u.x + x[y].u.y;
|
||||||
|
bar (&p);
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
f3 (struct B *x, int y)
|
||||||
|
{
|
||||||
|
struct A p;
|
||||||
|
p.x = 1.0f;
|
||||||
|
p.y = 2.0f;
|
||||||
|
struct A *q = &x[y].u;
|
||||||
|
__builtin_memcpy (&q->x, &p.x, sizeof (float));
|
||||||
|
__builtin_memcpy (&q->y, &p.y, sizeof (float));
|
||||||
|
*q = p;
|
||||||
|
float f = x[y].u.x + x[y].u.y;
|
||||||
|
bar (&p);
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
f4 (struct B *x, int y)
|
||||||
|
{
|
||||||
|
struct A p;
|
||||||
|
p.x = 1.0f;
|
||||||
|
p.y = 2.0f;
|
||||||
|
__builtin_memcpy (&x[y].u.x, &p.x, sizeof (float));
|
||||||
|
__builtin_memcpy (&x[y].u.y, &p.y, sizeof (float));
|
||||||
|
float f = x[y].u.x + x[y].u.y;
|
||||||
|
bar (&p);
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* { dg-final { scan-tree-dump-times "return 3.0" 4 "fre1" } } */
|
||||||
|
/* { dg-final { cleanup-tree-dump "fre1" } } */
|
||||||
|
|
@ -1894,7 +1894,12 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
|
||||||
size2 = lhs_ref.size;
|
size2 = lhs_ref.size;
|
||||||
maxsize2 = lhs_ref.max_size;
|
maxsize2 = lhs_ref.max_size;
|
||||||
if (maxsize2 == -1
|
if (maxsize2 == -1
|
||||||
|| (base != base2 && !operand_equal_p (base, base2, 0))
|
|| (base != base2
|
||||||
|
&& (TREE_CODE (base) != MEM_REF
|
||||||
|
|| TREE_CODE (base2) != MEM_REF
|
||||||
|
|| TREE_OPERAND (base, 0) != TREE_OPERAND (base2, 0)
|
||||||
|
|| !tree_int_cst_equal (TREE_OPERAND (base, 1),
|
||||||
|
TREE_OPERAND (base2, 1))))
|
||||||
|| offset2 > offset
|
|| offset2 > offset
|
||||||
|| offset2 + size2 < offset + maxsize)
|
|| offset2 + size2 < offset + maxsize)
|
||||||
return (void *)-1;
|
return (void *)-1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue