Commit 6d244704 by Jan Hubicka Committed by Jan Hubicka

revert: ipa-icf-gimple.c (func_checker::compare_operand): Compare only empty constructors.

	Revert:
	* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
	empty constructors.
	* gcc.c-torture/compile/icfmatch.c: Add testcase

From-SVN: r228875
parent 535a8637
2015-10-11 Jan Hubicka <hubicka@ucw.cz>
Revert:
* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
empty constructors.
2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
......@@ -415,9 +415,20 @@ func_checker::compare_operand (tree t1, tree t2)
switch (TREE_CODE (t1))
{
case CONSTRUCTOR:
gcc_assert (!vec_safe_length (CONSTRUCTOR_ELTS (t1))
&& !vec_safe_length (CONSTRUCTOR_ELTS (t2)));
return true;
{
unsigned length1 = vec_safe_length (CONSTRUCTOR_ELTS (t1));
unsigned length2 = vec_safe_length (CONSTRUCTOR_ELTS (t2));
if (length1 != length2)
return return_false ();
for (unsigned i = 0; i < length1; i++)
if (!compare_operand (CONSTRUCTOR_ELT (t1, i)->value,
CONSTRUCTOR_ELT (t2, i)->value))
return return_false();
return true;
}
case ARRAY_REF:
case ARRAY_RANGE_REF:
/* First argument is the array, second is the index. */
......
2015-10-11 Jan Hubicka <hubicka@ucw.cz>
* gcc.c-torture/compile/icfmatch.c: Add testcase
2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67926
......
typedef char __attribute__ ((vector_size (4))) v4qi;
void retv (int a,int b,int c,int d, v4qi *ret)
{
v4qi v = { a, b , c, d };
*ret = v;
}
void retv2 (int a,int b,int c,int d, v4qi *ret)
{
v4qi v = { a, b , c, d };
*ret = v;
}
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