Commit 2f35958c by Martin Jambor Committed by Martin Jambor

re PR ipa/64153 (r218205 miscompiles libgomp)

2014-12-03  Martin Jambor  <mjambor@suse.cz>

	PR ipa/64153
	* ipa-inline-analysis.c (evaluate_conditions_for_known_args): Check
	type sizes before view_converting.

From-SVN: r218316
parent 68bc9270
2014-12-03 Martin Jambor <mjambor@suse.cz>
PR ipa/64153
* ipa-inline-analysis.c (evaluate_conditions_for_known_args): Check
type sizes before view_converting.
2014-12-03 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/64151
......@@ -880,12 +880,19 @@ evaluate_conditions_for_known_args (struct cgraph_node *node,
}
if (c->code == IS_NOT_CONSTANT || c->code == CHANGED)
continue;
val = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (c->val), val);
res = val
? fold_binary_to_constant (c->code, boolean_type_node, val, c->val)
: NULL;
if (res && integer_zerop (res))
continue;
if (operand_equal_p (TYPE_SIZE (TREE_TYPE (c->val)),
TYPE_SIZE (TREE_TYPE (val)), 0))
{
val = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (c->val), val);
res = val
? fold_binary_to_constant (c->code, boolean_type_node, val, c->val)
: NULL;
if (res && integer_zerop (res))
continue;
}
clause |= 1 << (i + predicate_first_dynamic_condition);
}
return clause;
......
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