aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/ifcvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/ifcvt.c')
-rw-r--r--gcc-4.8/gcc/ifcvt.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/ifcvt.c b/gcc-4.8/gcc/ifcvt.c
index 88967a6c2..e3353a5f2 100644
--- a/gcc-4.8/gcc/ifcvt.c
+++ b/gcc-4.8/gcc/ifcvt.c
@@ -115,7 +115,11 @@ count_bb_insns (const_basic_block bb)
while (1)
{
- if (CALL_P (insn) || NONJUMP_INSN_P (insn))
+ if ((CALL_P (insn) || NONJUMP_INSN_P (insn))
+ /* Don't count USE/CLOBBER insns, flow_find_cross_jump etc.
+ don't count them either and we need consistency. */
+ && GET_CODE (PATTERN (insn)) != USE
+ && GET_CODE (PATTERN (insn)) != CLOBBER)
count++;
if (insn == BB_END (bb))
@@ -505,7 +509,10 @@ cond_exec_process_if_block (ce_if_block_t * ce_info,
n_insns -= 2 * n_matching;
}
- if (then_start && else_start)
+ if (then_start
+ && else_start
+ && then_n_insns > n_matching
+ && else_n_insns > n_matching)
{
int longest_match = MIN (then_n_insns - n_matching,
else_n_insns - n_matching);