+2007-03-17 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/31041
+ * tree-vect-transform.c (get_initial_def_for_induction): Call
+ force_gimple_operand.
+
2007-03-17 Olga Golovanevsky <olga@il.ibm.com>
* ipa-type-escape.c (look_for_casts) : Revert code to use
+2007-03-17 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/31041
+ * gcc.dg/vect/pr31041.c: New test.
+
2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* g++.dg/warn/Wconversion-integer.C: New
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+typedef int int32_t;
+struct UNewTrie
+{
+ int32_t index[(0x110000 >> 1)];
+};
+typedef struct UNewTrie UNewTrie;
+utrie_open_3_4 ()
+{
+ UNewTrie *trie;
+ int32_t i, j;
+ {
+ i = 0;
+ do
+ {
+ trie->index[i++] = j;
+ j += 1;
+ }
+ while (i < 5);
+ }
+}
+/* { dg-final { cleanup-tree-dump "vect" } } */
int ncopies = vf / nunits;
tree expr;
stmt_vec_info phi_info = vinfo_for_stmt (iv_phi);
+ tree stmts;
gcc_assert (phi_info);
gcc_assert (ok);
/* Create the vector that holds the initial_value of the induction. */
- new_name = init_expr;
+ new_var = vect_get_new_vect_var (scalar_type, vect_scalar_var, "var_");
+ add_referenced_var (new_var);
+
+ new_name = force_gimple_operand (init_expr, &stmts, false, new_var);
+ if (stmts)
+ {
+ new_bb = bsi_insert_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
t = NULL_TREE;
- t = tree_cons (NULL_TREE, init_expr, t);
+ t = tree_cons (NULL_TREE, new_name, t);
for (i = 1; i < nunits; i++)
{
tree tmp;
/* Create: new_name = new_name + step_expr */
- new_var = vect_get_new_vect_var (scalar_type, vect_scalar_var, "var_");
- add_referenced_var (new_var);
tmp = fold_build2 (PLUS_EXPR, scalar_type, new_name, step_expr);
init_stmt = build_gimple_modify_stmt (new_var, tmp);
new_name = make_ssa_name (new_var, init_stmt);