Re: [oe] [meta-oe][PATCH 1/2] gcc-4.6: Fix ICE on x86_64 seen during vectorization

2012-01-10 Thread Martin Jansa
On Mon, Jan 09, 2012 at 03:44:15PM -0800, Khem Raj wrote:
> Signed-off-by: Khem Raj 
> ---
>  .../gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch|   66 ++-
>  meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc|2 +-
>  2 files changed, 49 insertions(+), 19 deletions(-)

Tested together with 2/2 on libav/libvpx/mplayer with
-fno-tree-vectorize removed and it works, no ICE on qemux86-64, thanks!

I'll send patch removing -fno-tree-vectorize from those recipes when
this is in.

Cheers,

> diff --git 
> a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch 
> b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch
> index ff34514..3a14923 100644
> --- a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch
> +++ b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch
> @@ -53,7 +53,7 @@
>  Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
>  ===
>  --- /dev/null1970-01-01 00:00:00.0 +
> -+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c   
> 2011-09-16 20:32:57.279056697 -0700
>  gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c   
> 2012-01-09 15:03:29.156918805 -0800
>  @@ -0,0 +1,52 @@
>  +/* { dg-require-effective-target vect_int } */
>  +
> @@ -110,7 +110,7 @@ Index: 
> gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
>  Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
>  ===
>  --- /dev/null1970-01-01 00:00:00.0 +
> -+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c   
> 2011-09-16 20:32:57.279056697 -0700
>  gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c   
> 2012-01-09 15:03:29.156918805 -0800
>  @@ -0,0 +1,59 @@
>  +/* { dg-require-effective-target vect_int } */
>  +
> @@ -174,7 +174,7 @@ Index: 
> gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
>  Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
>  ===
>  --- /dev/null1970-01-01 00:00:00.0 +
> -+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c  
> 2011-09-16 20:32:57.279056697 -0700
>  gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c  
> 2012-01-09 15:03:29.160918806 -0800
>  @@ -0,0 +1,49 @@
>  +/* { dg-require-effective-target vect_int } */
>  +
> @@ -227,8 +227,8 @@ Index: 
> gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
>  +
>  Index: gcc-4_6-branch/gcc/tree-vect-loop.c
>  ===
>  gcc-4_6-branch.orig/gcc/tree-vect-loop.c 2011-09-16 20:31:52.0 
> -0700
> -+++ gcc-4_6-branch/gcc/tree-vect-loop.c  2011-09-16 20:32:57.289056641 
> -0700
> +--- gcc-4_6-branch.orig/gcc/tree-vect-loop.c 2012-01-09 15:02:15.0 
> -0800
>  gcc-4_6-branch/gcc/tree-vect-loop.c  2012-01-09 15:03:29.160918806 
> -0800
>  @@ -181,6 +181,8 @@
> stmt_vec_info stmt_info;
> int i;
> @@ -379,8 +379,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-loop.c
>   
>  Index: gcc-4_6-branch/gcc/tree-vect-patterns.c
>  ===
>  gcc-4_6-branch.orig/gcc/tree-vect-patterns.c 2011-09-16 
> 20:31:52.0 -0700
> -+++ gcc-4_6-branch/gcc/tree-vect-patterns.c  2011-09-16 20:32:57.289056641 
> -0700
> +--- gcc-4_6-branch.orig/gcc/tree-vect-patterns.c 2012-01-09 
> 15:02:15.0 -0800
>  gcc-4_6-branch/gcc/tree-vect-patterns.c  2012-01-09 15:03:29.160918806 
> -0800
>  @@ -39,10 +39,13 @@
>   #include "diagnostic-core.h"
>   
> @@ -930,8 +930,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-patterns.c
>   fprintf (vect_dump, "=== vect_pattern_recog ===");
>  Index: gcc-4_6-branch/gcc/tree-vect-slp.c
>  ===
>  gcc-4_6-branch.orig/gcc/tree-vect-slp.c  2011-09-16 20:31:52.0 
> -0700
> -+++ gcc-4_6-branch/gcc/tree-vect-slp.c   2011-09-16 20:32:57.289056641 
> -0700
> +--- gcc-4_6-branch.orig/gcc/tree-vect-slp.c  2012-01-09 15:02:15.0 
> -0800
>  gcc-4_6-branch/gcc/tree-vect-slp.c   2012-01-09 15:03:29.160918806 
> -0800
>  @@ -152,7 +152,9 @@
> if (loop && def_stmt && gimple_bb (def_stmt)
> && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
> @@ -945,8 +945,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-slp.c
>   *pattern0 = true;
>  Index: gcc-4_6-branch/gcc/tree-vect-stmts.c
>  ===
>  gcc-4_6-branch.orig/gcc/tree-vect-stmts.c2011-09-16 
> 20:31:52.0 -0700
> -+++ gcc-4_6-branch/gcc/tree-vect-stmts.c 2011-09-16 20:32:57.289056641 
> -0700
>

[oe] [meta-oe][PATCH 1/2] gcc-4.6: Fix ICE on x86_64 seen during vectorization

2012-01-09 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 .../gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch|   66 ++-
 meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc|2 +-
 2 files changed, 49 insertions(+), 19 deletions(-)

diff --git 
a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch 
b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch
index ff34514..3a14923 100644
--- a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch
@@ -53,7 +53,7 @@
 Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
 ===
 --- /dev/null  1970-01-01 00:00:00.0 +
-+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c 
2011-09-16 20:32:57.279056697 -0700
 gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c 
2012-01-09 15:03:29.156918805 -0800
 @@ -0,0 +1,52 @@
 +/* { dg-require-effective-target vect_int } */
 +
@@ -110,7 +110,7 @@ Index: 
gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
 Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
 ===
 --- /dev/null  1970-01-01 00:00:00.0 +
-+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c 
2011-09-16 20:32:57.279056697 -0700
 gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c 
2012-01-09 15:03:29.156918805 -0800
 @@ -0,0 +1,59 @@
 +/* { dg-require-effective-target vect_int } */
 +
@@ -174,7 +174,7 @@ Index: 
gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
 Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
 ===
 --- /dev/null  1970-01-01 00:00:00.0 +
-+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
2011-09-16 20:32:57.279056697 -0700
 gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
2012-01-09 15:03:29.160918806 -0800
 @@ -0,0 +1,49 @@
 +/* { dg-require-effective-target vect_int } */
 +
@@ -227,8 +227,8 @@ Index: 
gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
 +
 Index: gcc-4_6-branch/gcc/tree-vect-loop.c
 ===
 gcc-4_6-branch.orig/gcc/tree-vect-loop.c   2011-09-16 20:31:52.0 
-0700
-+++ gcc-4_6-branch/gcc/tree-vect-loop.c2011-09-16 20:32:57.289056641 
-0700
+--- gcc-4_6-branch.orig/gcc/tree-vect-loop.c   2012-01-09 15:02:15.0 
-0800
 gcc-4_6-branch/gcc/tree-vect-loop.c2012-01-09 15:03:29.160918806 
-0800
 @@ -181,6 +181,8 @@
stmt_vec_info stmt_info;
int i;
@@ -379,8 +379,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-loop.c
  
 Index: gcc-4_6-branch/gcc/tree-vect-patterns.c
 ===
 gcc-4_6-branch.orig/gcc/tree-vect-patterns.c   2011-09-16 
20:31:52.0 -0700
-+++ gcc-4_6-branch/gcc/tree-vect-patterns.c2011-09-16 20:32:57.289056641 
-0700
+--- gcc-4_6-branch.orig/gcc/tree-vect-patterns.c   2012-01-09 
15:02:15.0 -0800
 gcc-4_6-branch/gcc/tree-vect-patterns.c2012-01-09 15:03:29.160918806 
-0800
 @@ -39,10 +39,13 @@
  #include "diagnostic-core.h"
  
@@ -930,8 +930,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-patterns.c
  fprintf (vect_dump, "=== vect_pattern_recog ===");
 Index: gcc-4_6-branch/gcc/tree-vect-slp.c
 ===
 gcc-4_6-branch.orig/gcc/tree-vect-slp.c2011-09-16 20:31:52.0 
-0700
-+++ gcc-4_6-branch/gcc/tree-vect-slp.c 2011-09-16 20:32:57.289056641 -0700
+--- gcc-4_6-branch.orig/gcc/tree-vect-slp.c2012-01-09 15:02:15.0 
-0800
 gcc-4_6-branch/gcc/tree-vect-slp.c 2012-01-09 15:03:29.160918806 -0800
 @@ -152,7 +152,9 @@
if (loop && def_stmt && gimple_bb (def_stmt)
&& flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
@@ -945,8 +945,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-slp.c
  *pattern0 = true;
 Index: gcc-4_6-branch/gcc/tree-vect-stmts.c
 ===
 gcc-4_6-branch.orig/gcc/tree-vect-stmts.c  2011-09-16 20:31:52.0 
-0700
-+++ gcc-4_6-branch/gcc/tree-vect-stmts.c   2011-09-16 20:32:57.289056641 
-0700
+--- gcc-4_6-branch.orig/gcc/tree-vect-stmts.c  2012-01-09 15:02:15.0 
-0800
 gcc-4_6-branch/gcc/tree-vect-stmts.c   2012-01-09 15:06:23.636927250 
-0800
 @@ -126,33 +126,72 @@
  
  static void
@@ -1007,6 +1007,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-stmts.c
 + pattern that can potentially be vectorized.  Don't mark the stmt
 + as relevant/live because it's not going to be vectorized.
 + Instead mark the pattern-stmt that replaces it.  */
+