mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-10 23:55:50 +08:00
tree-ssa-pre.c (insert_into_preds_of_block): Don't rewrite constant part of expression.
2008-10-20 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-pre.c (insert_into_preds_of_block): Don't rewrite constant part of expression. From-SVN: r141249
This commit is contained in:
parent
8454152598
commit
15d5fe337e
@ -1,3 +1,8 @@
|
||||
2008-10-20 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
* tree-ssa-pre.c (insert_into_preds_of_block): Don't rewrite constant
|
||||
part of expression.
|
||||
|
||||
2008-10-20 Tobias Schlüter <tobi@gcc.gnu.org>
|
||||
|
||||
* doc/install.texi: Fix typos in previous patch.
|
||||
|
@ -3019,23 +3019,15 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum,
|
||||
should give us back a constant with the right type.
|
||||
*/
|
||||
tree constant = PRE_EXPR_CONSTANT (eprime);
|
||||
if (TREE_TYPE (constant) != type)
|
||||
if (!useless_type_conversion_p (type, TREE_TYPE (constant)))
|
||||
{
|
||||
tree builtexpr = fold_convert (type, constant);
|
||||
if (is_gimple_min_invariant (builtexpr))
|
||||
{
|
||||
PRE_EXPR_CONSTANT (eprime) = builtexpr;
|
||||
}
|
||||
else
|
||||
if (!is_gimple_min_invariant (builtexpr))
|
||||
{
|
||||
tree forcedexpr = force_gimple_operand (builtexpr,
|
||||
&stmts, true,
|
||||
NULL);
|
||||
if (is_gimple_min_invariant (forcedexpr))
|
||||
{
|
||||
PRE_EXPR_CONSTANT (eprime) = forcedexpr;
|
||||
}
|
||||
else
|
||||
if (!is_gimple_min_invariant (forcedexpr))
|
||||
{
|
||||
if (forcedexpr != builtexpr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user