Blame SOURCES/gcc48-pr69891.patch

fdda51
2016-02-26  Jakub Jelinek  <jakub@redhat.com>
fdda51
	    Eric Botcazou  <ebotcazou@adacore.com>
fdda51
fdda51
	PR rtl-optimization/69891
fdda51
	* dse.c (scan_insn): If we can't figure out memset arguments
fdda51
	or they are non-constant, call clear_rhs_from_active_local_stores.
fdda51
fdda51
--- gcc/testsuite/gcc.target/i386/pr69891.c	(nonexistent)
fdda51
+++ gcc/testsuite/gcc.target/i386/pr69891.c	(revision 238137)
fdda51
@@ -0,0 +1,30 @@
fdda51
+/* PR rtl-optimization/69891 */
fdda51
+/* { dg-do run } */
fdda51
+/* { dg-options "-O -fno-tree-fre -mstringop-strategy=libcall -Wno-psabi" } */
fdda51
+/* { dg-additional-options "-mno-sse" { target ia32 } } */
fdda51
+
fdda51
+typedef unsigned short A;
fdda51
+typedef unsigned short B __attribute__ ((vector_size (32)));
fdda51
+typedef unsigned int C;
fdda51
+typedef unsigned int D __attribute__ ((vector_size (32)));
fdda51
+typedef unsigned long long E;
fdda51
+typedef unsigned long long F __attribute__ ((vector_size (32)));
fdda51
+
fdda51
+__attribute__((noinline, noclone)) unsigned
fdda51
+foo(D a, B b, D c, F d)
fdda51
+{
fdda51
+  b /= (B) {1, -c[0]} | 1;
fdda51
+  c[0] |= 7;
fdda51
+  a %= c | 1;
fdda51
+  c ^= c;
fdda51
+  return a[0] + b[15] + c[0] + d[3];
fdda51
+}
fdda51
+
fdda51
+int
fdda51
+main ()
fdda51
+{
fdda51
+  unsigned x = foo ((D) {}, (B) {}, (D) {}, (F) {});
fdda51
+  if (x != 0)
fdda51
+    __builtin_abort ();
fdda51
+  return 0;
fdda51
+}
fdda51
--- gcc/dse.c	(revision 238136)
fdda51
+++ gcc/dse.c	(revision 238137)
fdda51
@@ -2582,6 +2582,8 @@
fdda51
 		      active_local_stores = insn_info;
fdda51
 		    }
fdda51
 		}
fdda51
+	      else
fdda51
+		clear_rhs_from_active_local_stores ();
fdda51
 	    }
fdda51
 	}
fdda51