From 646bea10e5f7be362618a8cdcf91d87ea9771fd1 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 16 Apr 2009 14:53:32 +0000 Subject: tree-cfg.c (verify_gimple_assign_binary): Allow POINTER_PLUS_EXPR-like PLUS_EXPR for vectors. 2009-04-16 Richard Guenther * tree-cfg.c (verify_gimple_assign_binary): Allow POINTER_PLUS_EXPR-like PLUS_EXPR for vectors. * ipa-struct-reorg.c (gen_size): Fold the built expressions. (create_general_new_stmt): Note that this function is broken. From-SVN: r146197 --- gcc/ipa-struct-reorg.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/ipa-struct-reorg.c') diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index 9ca5364..8b5360d 100644 --- a/gcc/ipa-struct-reorg.c +++ b/gcc/ipa-struct-reorg.c @@ -606,13 +606,17 @@ gen_size (tree num, tree type, tree *res) if (exact_log2 (struct_size_int) == -1) { tree size = build_int_cst (TREE_TYPE (num), struct_size_int); - new_stmt = gimple_build_assign_with_ops (MULT_EXPR, *res, num, size); + new_stmt = gimple_build_assign (*res, fold_build2 (MULT_EXPR, + TREE_TYPE (num), + num, size)); } else { tree C = build_int_cst (TREE_TYPE (num), exact_log2 (struct_size_int)); - new_stmt = gimple_build_assign_with_ops (LSHIFT_EXPR, *res, num, C); + new_stmt = gimple_build_assign (*res, fold_build2 (LSHIFT_EXPR, + TREE_TYPE (num), + num, C)); } finalize_stmt (new_stmt); @@ -1291,6 +1295,8 @@ create_general_new_stmt (struct access_site *acc, tree new_type) { pos = find_pos_in_stmt (new_stmt, var); gcc_assert (pos); + /* ??? This misses adjustments to the type of the + INDIRECT_REF we possibly replace the operand of. */ *pos = new_var; } } -- cgit v1.1