From b2a58473d7b5cb84c43da1a7749b29a96a4bfbad Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 12 Aug 2009 16:28:36 +0000 Subject: [PATCH] re PR bootstrap/41031 (ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf) 2009-08-12 Richard Sandiford PR tree-optimization/41031 * tree-outof-ssa.c (insert_value_copy_on_edge): Use promote_decl_mode on the partition variable rather than promote_mode on the source type. Assert that the partition variable's type has the same mode as the source value's. From-SVN: r150701 --- gcc/ChangeLog | 8 ++++++++ gcc/tree-outof-ssa.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cea1ba72fe9..9af6c7172f61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-08-12 Richard Sandiford + + PR tree-optimization/41031 + * tree-outof-ssa.c (insert_value_copy_on_edge): Use promote_decl_mode + on the partition variable rather than promote_mode on the source + type. Assert that the partition variable's type has the same + mode as the source value's. + 2009-08-12 Paolo Bonzini * doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index c0826e704239..220171ca7f9d 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -197,6 +197,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus) rtx seq, x; enum machine_mode dest_mode, src_mode; int unsignedp; + tree var; if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -217,9 +218,10 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus) start_sequence (); + var = SSA_NAME_VAR (partition_to_var (SA.map, dest)); src_mode = TYPE_MODE (TREE_TYPE (src)); - unsignedp = TYPE_UNSIGNED (TREE_TYPE (src)); - dest_mode = promote_mode (TREE_TYPE (src), src_mode, &unsignedp); + dest_mode = promote_decl_mode (var, &unsignedp); + gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var))); gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest])); if (src_mode != dest_mode) -- 2.47.2