Commit 0048539a by Martin Liska Committed by Martin Liska

Add CONSTRUCTOR_NO_CLEARING to operand_equal_p.

2019-11-07  Martin Liska  <mliska@suse.cz>

	* fold-const.c (operand_compare::operand_equal_p): Add comparison
	of CONSTRUCTOR_NO_CLEARING.
	(operand_compare::hash_operand): Likewise.

From-SVN: r277912
parent db37dc33
2019-11-07 Martin Liska <mliska@suse.cz>
* fold-const.c (operand_compare::operand_equal_p): Add comparison
of CONSTRUCTOR_NO_CLEARING.
(operand_compare::hash_operand): Likewise.
2019-11-07 Georg-Johann Lay <avr@gjlay.de> 2019-11-07 Georg-Johann Lay <avr@gjlay.de>
Support 64-bit double and 64-bit long double configurations. Support 64-bit double and 64-bit long double configurations.
...@@ -3475,6 +3475,9 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, ...@@ -3475,6 +3475,9 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1,
case tcc_exceptional: case tcc_exceptional:
if (TREE_CODE (arg0) == CONSTRUCTOR) if (TREE_CODE (arg0) == CONSTRUCTOR)
{ {
if (CONSTRUCTOR_NO_CLEARING (arg0) != CONSTRUCTOR_NO_CLEARING (arg1))
return false;
/* In GIMPLE constructors are used only to build vectors from /* In GIMPLE constructors are used only to build vectors from
elements. Individual elements in the constructor must be elements. Individual elements in the constructor must be
indexed in increasing order and form an initial sequence. indexed in increasing order and form an initial sequence.
...@@ -3657,6 +3660,7 @@ operand_compare::hash_operand (const_tree t, inchash::hash &hstate, ...@@ -3657,6 +3660,7 @@ operand_compare::hash_operand (const_tree t, inchash::hash &hstate,
unsigned HOST_WIDE_INT idx; unsigned HOST_WIDE_INT idx;
tree field, value; tree field, value;
flags &= ~OEP_ADDRESS_OF; flags &= ~OEP_ADDRESS_OF;
hstate.add_int (CONSTRUCTOR_NO_CLEARING (t));
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (t), idx, field, value) FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (t), idx, field, value)
{ {
/* In GIMPLE the indexes can be either NULL or matching i. */ /* In GIMPLE the indexes can be either NULL or matching i. */
......
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