+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
rtx seq, x;
enum machine_mode dest_mode, src_mode;
int unsignedp;
+ tree var;
if (dump_file && (dump_flags & TDF_DETAILS))
{
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)