diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-outof-ssa.c | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cea1ba..9af6c71 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-08-12 Richard Sandiford <rdsandiford@googlemail.com> + + 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 <bonzini@gnu.org> * doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index c0826e7..220171c 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) |