summaryrefslogtreecommitdiff
path: root/gcc/tree-outof-ssa.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-12 16:28:36 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-12 16:28:36 +0000
commit27d3c04fe0a482189f9826ea73e8019f044afd16 (patch)
treea245afb0c4d602c96d77180fd5947277aecd8445 /gcc/tree-outof-ssa.c
parentc879dbcf300ded0ca2f86a8cd9ea87528c27f3c0 (diff)
downloadgcc-27d3c04fe0a482189f9826ea73e8019f044afd16.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150701 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r--gcc/tree-outof-ssa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index c0826e70423..220171ca7f9 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)