re PR tree-optimization/66002 (paq8p benchmark 50% slower than clang on sandybridge)
authorRichard Biener <rguenther@suse.de>
Thu, 7 May 2015 09:52:38 +0000 (09:52 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 7 May 2015 09:52:38 +0000 (09:52 +0000)
2015-05-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/66002
* passes.def: Schedule another pass_merge_phi after ifcombine, right
before phiopt.

* gcc.dg/vect/vect-125.c: New testcase.

From-SVN: r222873

gcc/ChangeLog
gcc/passes.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-125.c [new file with mode: 0644]

index beabbcb5fa0f0f79d6879d6f9a773bfb8daf0675..c294b014d62199a1d3fd647fa003c24be909dff1 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-07  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/66002
+       * passes.def: Schedule another pass_merge_phi after ifcombine, right
+       before phiopt.
+
 2015-05-07  Marek Polacek  <polacek@redhat.com>
            Martin Uecker  <uecker@eecs.berkeley.edu>
 
index 32213e8561c817851a1a6aafb0ee5ef3610a9217..4690e23afb2635704442c18eb0fbff1688907adb 100644 (file)
@@ -177,6 +177,7 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_cselim);
       NEXT_PASS (pass_copy_prop);
       NEXT_PASS (pass_tree_ifcombine);
+      NEXT_PASS (pass_merge_phi);
       NEXT_PASS (pass_phiopt);
       NEXT_PASS (pass_tail_recursion);
       NEXT_PASS (pass_ch);
index d4d52638150bddc48cae1bbeabdefbae37d944c3..69cb4ffd56c80b0dcac9530d76462478fa4370c3 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-07  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/66002
+       * gcc.dg/vect/vect-125.c: New testcase.
+
 2015-05-07  Marek Polacek  <polacek@redhat.com>
            Martin Uecker  <uecker@eecs.berkeley.edu>
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-125.c b/gcc/testsuite/gcc.dg/vect/vect-125.c
new file mode 100644 (file)
index 0000000..f6ffef5
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_int_mult } */
+/* { dg-require-effective-target vect_pack_trunc } */
+/* { dg-require-effective-target vect_unpack } */
+
+void train(short *t, short *w, int n, int err)
+{
+  n=(n+7)&-8;
+  for (int i=0; i<n; ++i)
+    {
+      int wt=w[i]+((t[i]*err*2>>16)+1>>1);
+      if (wt<-32768) wt=-32768;
+      if (wt>32767) wt=32767;
+      w[i]=wt;
+    }
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */