Commit 2e73b8fe by Kyrylo Tkachov Committed by Kyrylo Tkachov

[RTL-ifcvt] PR rtl-optimization/67481: Look more deeply for CCmode sets during if-covnersion

	PR rtl-optimization/67481
	* ifcvt.c (contains_ccmode_rtx_p): New function.
	(insn_valid_noce_process_p): Use it.

From-SVN: r228195
parent 470512c3
2015-09-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/67481
* ifcvt.c (contains_ccmode_rtx_p): New function.
(insn_valid_noce_process_p): Use it.
2015-09-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/67456
PR rtl-optimization/67464
PR rtl-optimization/67465
......@@ -1761,6 +1761,19 @@ noce_try_cmove (struct noce_if_info *if_info)
return FALSE;
}
/* Return true if X contains a conditional code mode rtx. */
static bool
contains_ccmode_rtx_p (rtx x)
{
subrtx_iterator::array_type array;
FOR_EACH_SUBRTX (iter, array, x, ALL)
if (GET_MODE_CLASS (GET_MODE (*iter)) == MODE_CC)
return true;
return false;
}
/* Helper for bb_valid_for_noce_process_p. Validate that
the rtx insn INSN is a single set that does not set
the conditional register CC and is in general valid for
......@@ -1779,6 +1792,7 @@ insn_valid_noce_process_p (rtx_insn *insn, rtx cc)
/* Currently support only simple single sets in test_bb. */
if (!sset
|| !noce_operand_ok (SET_DEST (sset))
|| contains_ccmode_rtx_p (SET_DEST (sset))
|| !noce_operand_ok (SET_SRC (sset)))
return false;
......
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