Commit a8355e51 by Bin Cheng Committed by Bin Cheng

fold-const.c (operand_equal_p): Consider NOP_EXPR and CONVERT_EXPR as equal nodes.

	* fold-const.c (operand_equal_p): Consider NOP_EXPR and
	CONVERT_EXPR as equal nodes.

From-SVN: r200062
parent 8f7e6e33
2013-06-13 Bin Cheng <bin.cheng@arm.com>
* fold-const.c (operand_equal_p): Consider NOP_EXPR and
CONVERT_EXPR as equal nodes.
2013-06-13 Bin Cheng <bin.cheng@arm.com>
* rtlanal.c (noop_move_p): Check the code to be executed for
COND_EXEC.
......
......@@ -2473,9 +2473,13 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
}
if (TREE_CODE (arg0) != TREE_CODE (arg1)
/* This is needed for conversions and for COMPONENT_REF.
Might as well play it safe and always test this. */
|| TREE_CODE (TREE_TYPE (arg0)) == ERROR_MARK
/* NOP_EXPR and CONVERT_EXPR are considered equal. */
&& !(CONVERT_EXPR_P (arg0) && CONVERT_EXPR_P (arg1)))
return 0;
/* This is needed for conversions and for COMPONENT_REF.
Might as well play it safe and always test this. */
if (TREE_CODE (TREE_TYPE (arg0)) == ERROR_MARK
|| TREE_CODE (TREE_TYPE (arg1)) == ERROR_MARK
|| TYPE_MODE (TREE_TYPE (arg0)) != TYPE_MODE (TREE_TYPE (arg1)))
return 0;
......
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