Commit c7b19145 by Yuri Rumyantsev Committed by Ilya Enkovich

re PR rtl-optimization/68920 (Undesirable if-conversion for a rarely taken branch)

gcc/

2016-01-21  Yuri Rumyantsev  <ysrumyan@gmail.com>

	PR rtl-optimization/68920
	* ifcvt.c (cond_move_process_if_block): Limit number of conditional
	moves.

From-SVN: r232680
parent 35b707ff
2016-01-21 Yuri Rumyantsev <ysrumyan@gmail.com>
PR rtl-optimization/68920
* ifcvt.c (cond_move_process_if_block): Limit number of conditional
moves.
2016-01-21 Vladimir Makarov <vmakarov@redhat.com> 2016-01-21 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/68990 PR rtl-optimization/68990
......
...@@ -3743,6 +3743,7 @@ cond_move_process_if_block (struct noce_if_info *if_info) ...@@ -3743,6 +3743,7 @@ cond_move_process_if_block (struct noce_if_info *if_info)
vec<rtx> else_regs = vNULL; vec<rtx> else_regs = vNULL;
unsigned int i; unsigned int i;
int success_p = FALSE; int success_p = FALSE;
int limit = PARAM_VALUE (PARAM_MAX_RTL_IF_CONVERSION_INSNS);
/* Build a mapping for each block to the value used for each /* Build a mapping for each block to the value used for each
register. */ register. */
...@@ -3792,7 +3793,8 @@ cond_move_process_if_block (struct noce_if_info *if_info) ...@@ -3792,7 +3793,8 @@ cond_move_process_if_block (struct noce_if_info *if_info)
is the number of assignments currently made in only one of the is the number of assignments currently made in only one of the
branches, since if we convert we are going to always execute branches, since if we convert we are going to always execute
them. */ them. */
if (c > MAX_CONDITIONAL_EXECUTE) if (c > MAX_CONDITIONAL_EXECUTE
|| c > limit)
goto done; goto done;
/* Try to emit the conditional moves. First do the then block, /* Try to emit the conditional moves. First do the then block,
......
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