diff options
author | Yuri Rumyantsev <ysrumyan@gmail.com> | 2016-01-21 16:05:14 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2016-01-21 16:05:14 +0000 |
commit | c7b19145cadaccdc5d4a931ff9d39b1c46c7bfb9 (patch) | |
tree | 9b6938c43adf17b08d2568fb4e1f6b24f19cae4f | |
parent | 35b707ff9990d8b442cf47913843978e9b50155d (diff) | |
download | gcc-c7b19145cadaccdc5d4a931ff9d39b1c46c7bfb9.zip gcc-c7b19145cadaccdc5d4a931ff9d39b1c46c7bfb9.tar.gz gcc-c7b19145cadaccdc5d4a931ff9d39b1c46c7bfb9.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ifcvt.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d15a87d..abde3f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> PR rtl-optimization/68990 diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index ec6c3de..74958fb 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -3743,6 +3743,7 @@ cond_move_process_if_block (struct noce_if_info *if_info) vec<rtx> else_regs = vNULL; unsigned int i; 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 register. */ @@ -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 branches, since if we convert we are going to always execute them. */ - if (c > MAX_CONDITIONAL_EXECUTE) + if (c > MAX_CONDITIONAL_EXECUTE + || c > limit) goto done; /* Try to emit the conditional moves. First do the then block, |