Fix PR tree-optimization/77808
gcc/
PR tree-optimization/77808
* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Check base_addr
and addr are different before copying points-to information.
gcc/testsuite/
PR tree-optimization/77808
* gcc.dg/tree-ssa/pr77808.c: New testcase.
From-SVN: r240749
+2016-10-04 Doug Gilmore <doug.gilmore@imgtec.com>
+
+ PR tree-optimization/77808
+ * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Check base_addr
+ and addr are different before copying points-to information.
+
2016-10-04 Uros Bizjak <ubizjak@gmail.com>
* config/i386/x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove.
+2016-10-04 Doug Gilmore <doug.gilmore@imgtec.com>
+
+ PR tree-optimization/77808
+ * gcc.dg/tree-ssa/pr77808.c: New testcase.
+
2016-10-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/77399
--- /dev/null
+/* PR tree-optimization/77808 */
+/* { dg-options "-O2 -fprefetch-loop-arrays --param prefetch-latency=0 -w" } */
+
+void
+daxpy(int n, double da, double * __restrict dx, double * __restrict dy)
+{
+ int i;
+
+ for (i = 0;i < n; i++)
+ dy[i] = dy[i] + da*dx[i];
+}
NULL, true, GSI_SAME_STMT);
}
- if (TREE_CODE (addr_base) == SSA_NAME
+ if (addr_base != addr
+ && TREE_CODE (addr_base) == SSA_NAME
&& TREE_CODE (addr) == SSA_NAME)
{
duplicate_ssa_name_ptr_info (addr, SSA_NAME_PTR_INFO (addr_base));