2019-05-03 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/90269
gcc/
* tree-loop-distribution.c (find_seed_stmts_for_distribution):
Ignore clobbers.
gcc/testsuite/
* g++.dg/tree-ssa/ldist-1.C: New file.
From-SVN: r270852
+2019-05-03 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/90269
+ * tree-loop-distribution.c (find_seed_stmts_for_distribution):
+ Ignore clobbers.
+
2019-05-03 Martin Liska <mliska@suse.cz>
* hash-map.h: Add is_empty function.
+2019-05-03 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/90269
+ * g++.dg/tree-ssa/ldist-1.C: New file.
+
2019-05-03 Richard Biener <rguenther@suse.de>
* gcc.dg/vect/slp-reduc-sad-2.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-ldist-details" } */
+
+#include <new>
+struct T {
+ int* p;
+ T(T const&t):p(t.p){}
+};
+void f(T*__restrict a,T*__restrict b){
+ for(int i=0;i<1024;++i){
+ new(a+i)T(b[i]);
+ b[i].~T();
+ }
+}
+
+/* { dg-final { scan-tree-dump "generated memcpy" "ldist" } } */
{
gimple *stmt = gsi_stmt (gsi);
+ /* Ignore clobbers, they do not have true side effects. */
+ if (gimple_clobber_p (stmt))
+ continue;
+
/* If there is a stmt with side-effects bail out - we
cannot and should not distribute this loop. */
if (gimple_has_side_effects (stmt))