]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/54610 (FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler...
authorJakub Jelinek <jakub@redhat.com>
Tue, 18 Sep 2012 13:03:09 +0000 (15:03 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 18 Sep 2012 13:03:09 +0000 (15:03 +0200)
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

gcc/ChangeLog
gcc/Makefile.in
gcc/testsuite/ChangeLog
gcc/tree-ssa-forwprop.c

index c6d36826b62274b3a93dc34a235c28de4aec2d55..73b828de03f30f415ffe818db44e1ee039bf8a4b 100644 (file)
@@ -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.
index d16c1a7e4df86cbfdaa6e0c242fd4aaaf7849b2b..d0412b8fca0f23f9dd1db31c20a7c9cf3a581b7d 100644 (file)
@@ -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) \
index 19e2719367163c90dc2f381786e48b61b7405d7f..208a6d23d42f99af10718ce36bf51e03c5f6e12b 100644 (file)
@@ -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
index 2d17bfa4d2f1b756c3f7b53b28daf7eb176b3ea2..a1628327a84afefa0515d63d60af36df702a619d 100644 (file)
@@ -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));
This page took 0.14395 seconds and 5 git commands to generate.