Commit f8a39967 by Jan Hubicka Committed by Jan Hubicka

gimple-fold.c (fold_gimple_assign): Fix condition guarding ipa-devirt path; fix thinko there.

	* gimple-fold.c (fold_gimple_assign): Fix condition guarding
	ipa-devirt path; fix thinko there.

From-SVN: r213150
parent eb5453a5
2014-07-28 Jan Hubicka <hubicka@ucw.cz>
* gimple-fold.c (fold_gimple_assign): Fix condition guarding
ipa-devirt path; fix thinko there.
2014-07-28 Trevor Saunders <tsaunders@mozilla.com> 2014-07-28 Trevor Saunders <tsaunders@mozilla.com>
* config/i386/i386.c (ix86_return_in_memory): replace one * config/i386/i386.c (ix86_return_in_memory): replace one
......
...@@ -372,11 +372,11 @@ fold_gimple_assign (gimple_stmt_iterator *si) ...@@ -372,11 +372,11 @@ fold_gimple_assign (gimple_stmt_iterator *si)
tree val = OBJ_TYPE_REF_EXPR (rhs); tree val = OBJ_TYPE_REF_EXPR (rhs);
if (is_gimple_min_invariant (val)) if (is_gimple_min_invariant (val))
return val; return val;
else if (flag_devirtualize && virtual_method_call_p (val)) else if (flag_devirtualize && virtual_method_call_p (rhs))
{ {
bool final; bool final;
vec <cgraph_node *>targets vec <cgraph_node *>targets
= possible_polymorphic_call_targets (val, stmt, &final); = possible_polymorphic_call_targets (rhs, stmt, &final);
if (final && targets.length () <= 1 && dbg_cnt (devirt)) if (final && targets.length () <= 1 && dbg_cnt (devirt))
{ {
tree fndecl; tree fndecl;
...@@ -395,7 +395,8 @@ fold_gimple_assign (gimple_stmt_iterator *si) ...@@ -395,7 +395,8 @@ fold_gimple_assign (gimple_stmt_iterator *si)
? targets[0]->name () ? targets[0]->name ()
: "__builtin_unreachable"); : "__builtin_unreachable");
} }
val = fold_convert (TREE_TYPE (val), fndecl); val = fold_convert (TREE_TYPE (val),
build_fold_addr_expr_loc (loc, fndecl));
STRIP_USELESS_TYPE_CONVERSION (val); STRIP_USELESS_TYPE_CONVERSION (val);
return val; return val;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment