diff options
author | Richard Guenther <rguenther@suse.de> | 2009-04-16 14:53:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-04-16 14:53:32 +0000 |
commit | 646bea10e5f7be362618a8cdcf91d87ea9771fd1 (patch) | |
tree | 39a3f83699560f41244729712877b85ac31886a7 /gcc/ipa-struct-reorg.c | |
parent | 02e819ffd481be3a48701f535e7daad5ddaaae6a (diff) | |
download | gcc-646bea10e5f7be362618a8cdcf91d87ea9771fd1.tar.gz |
tree-cfg.c (verify_gimple_assign_binary): Allow POINTER_PLUS_EXPR-like PLUS_EXPR for vectors.
2009-04-16 Richard Guenther <rguenther@suse.de>
* 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
Diffstat (limited to 'gcc/ipa-struct-reorg.c')
-rw-r--r-- | gcc/ipa-struct-reorg.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index 9ca53645aa0..8b5360d00e9 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; } } |