From f709638a8d4de40489a146bbabc26bfea446d9b9 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 14 Jul 2008 08:46:14 +0000 Subject: [PATCH] tree-ssa-pre.c (insert_into_preds_of_block): Do not call convert. 2008-07-14 Richard Guenther * tree-ssa-pre.c (insert_into_preds_of_block): Do not call convert. From-SVN: r137780 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-pre.c | 11 ++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00d6661504e..09fa7d3f6f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-07-14 Richard Guenther + + * tree-ssa-pre.c (insert_into_preds_of_block): Do not call + convert. + 2008-07-14 Andreas Krebbel PR target/36745 diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 215074be8f9..07290bc48c4 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2949,18 +2949,11 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, our IL requires all operands of a phi node have the same type. */ tree name = PRE_EXPR_NAME (eprime); - if (TREE_TYPE (name) != type) + if (!useless_type_conversion_p (type, TREE_TYPE (name))) { tree builtexpr; tree forcedexpr; - /* When eliminating casts through unions, - we sometimes want to convert a real to an integer, - which fold_convert will ICE on */ -/* if (fold_convertible_p (type, name)) */ - builtexpr = fold_convert (type, name); -/* else - builtexpr = convert (type, name);*/ - + builtexpr = fold_convert (type, name); forcedexpr = force_gimple_operand (builtexpr, &stmts, true, NULL); -- 2.30.2