PR tree-optimization/50698
* tree-data-ref.c (split_constant_offset_1): Also process
offsets of &MEM.
* g++.dg/vect/pr50698.cc: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179895
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-10-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50698
+ * tree-data-ref.c (split_constant_offset_1): Also process
+ offsets of &MEM.
+
2011-10-12 David S. Miller <davem@davemloft.net>
* config/sparc/sparc.h: Do not force TARGET_VIS3 and TARGET_FMAF
+2011-10-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50698
+ * g++.dg/vect/pr50698.cc: New testcase.
+
2011-10-12 Janis Johnson <janisjo@codesourcery.com>
* gcc.target/powerpc/warn-1.c: Skip if not powerpc_vsx_ok.
--- /dev/null
+// { dg-do compile }
+// { dg-require-effective-target vect_float }
+
+float mem[4096];
+const int N=1024;
+
+struct XYZ {
+ float * mem;
+ int n;
+ float * x() { return mem;}
+ float * y() { return x()+n;}
+ float * z() { return y()+n;}
+};
+
+inline
+void sum(float * x, float * y, float * z, int n) {
+ for (int i=0;i!=n; ++i)
+ x[i]=y[i]+z[i];
+}
+
+void sumS() {
+ XYZ xyz; xyz.mem=mem; xyz.n=N;
+ sum(xyz.x(),xyz.y(),xyz.z(),xyz.n);
+}
+
+// { dg-final { scan-tree-dump-not "run-time aliasing" "vect" } }
+// { dg-final { cleanup-tree-dump "vect" } }
int punsignedp, pvolatilep;
op0 = TREE_OPERAND (op0, 0);
- if (!handled_component_p (op0))
- return false;
-
base = get_inner_reference (op0, &pbitsize, &pbitpos, &poffset,
&pmode, &punsignedp, &pvolatilep, false);