diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-09-18 15:03:09 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-09-18 15:03:09 +0200 |
commit | 1d61ee4252f7b906b37bb284e3b4616ebe61eaf6 (patch) | |
tree | c2579f37de05ea800ee4f7725ecdcacb4e090e03 | |
parent | 6889a65081852d52914d24abd76f3a227a2929c5 (diff) | |
download | gcc-1d61ee4252f7b906b37bb284e3b4616ebe61eaf6.zip gcc-1d61ee4252f7b906b37bb284e3b4616ebe61eaf6.tar.gz gcc-1d61ee4252f7b906b37bb284e3b4616ebe61eaf6.tar.bz2 |
re PR tree-optimization/54610 (FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler error) on x86 AVX targets)
PR tree-optimization/54610
* tree-ssa-forwprop.c: Include optabs.h. Don't include
tree-vectorizer.h.
(simplify_vector_constructor): Don't use vect_gen_perm_mask,
instead create the mask constant here.
* Makefile.in (tree-ssa-forwprop.o): Depend on $(OPTABS_H).
Don't depend on $(TREE_VECTORIZER_H).
* gcc.target/i386/pr54610.c: New test.
From-SVN: r191421
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 22 |
4 files changed, 32 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6d3682..73b828d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-09-18 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/54610 + * tree-ssa-forwprop.c: Include optabs.h. Don't include + tree-vectorizer.h. + (simplify_vector_constructor): Don't use vect_gen_perm_mask, + instead create the mask constant here. + * Makefile.in (tree-ssa-forwprop.o): Depend on $(OPTABS_H). + Don't depend on $(TREE_VECTORIZER_H). + 2012-09-18 Florian Weimer <fweimer@redhat.com> * Makefile.in (BASIC_BLOCK_H): Add cfg-flags.def. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index d16c1a7..d0412b8 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2246,7 +2246,7 @@ tree-ssa-forwprop.o : tree-ssa-forwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \ $(TREE_FLOW_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \ langhooks.h $(FLAGS_H) $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H) $(EXPR_H) \ - $(TREE_VECTORIZER_H) + $(OPTABS_H) tree-ssa-phiprop.o : tree-ssa-phiprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) \ $(TREE_FLOW_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 19e2719..208a6d2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-09-18 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/54610 + * gcc.target/i386/pr54610.c: New test. + 2012-09-17 Jason Merrill <jason@redhat.com> PR c++/54575 diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 2d17bfa..a162832 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "expr.h" #include "cfgloop.h" -#include "tree-vectorizer.h" +#include "optabs.h" /* This pass propagates the RHS of assignment statements into use sites of the LHS of the assignment. It's basically a specialized @@ -2854,14 +2854,24 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) return false; if (maybe_ident) - { - gimple_assign_set_rhs_from_tree (gsi, orig); - } + gimple_assign_set_rhs_from_tree (gsi, orig); else { - op2 = vect_gen_perm_mask (type, sel); - if (!op2) + tree mask_type, *mask_elts; + + if (!can_vec_perm_p (TYPE_MODE (type), false, sel)) + return false; + mask_type + = build_vector_type (build_nonstandard_integer_type (elem_size, 1), + nelts); + if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_VECTOR_INT + || GET_MODE_SIZE (TYPE_MODE (mask_type)) + != GET_MODE_SIZE (TYPE_MODE (type))) return false; + mask_elts = XALLOCAVEC (tree, nelts); + for (i = 0; i < nelts; i++) + mask_elts[i] = build_int_cst (TREE_TYPE (mask_type), sel[i]); + op2 = build_vector (mask_type, mask_elts); gimple_assign_set_rhs_with_ops_1 (gsi, VEC_PERM_EXPR, orig, orig, op2); } update_stmt (gsi_stmt (*gsi)); |