X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fifcvt.c;h=2939de4483e677f05a3719917712702f22f323ed;hb=aae061fde2843546ed8ff13a4e58cec9d0f5f47d;hp=5dd42fc8d7efa9c0dd5b1a5538118b808909feab;hpb=87dc0300484574218cab3aa98836958f1a52d2be;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 5dd42fc8d7e..2939de4483e 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -650,6 +650,12 @@ noce_try_store_flag_constants (if_info) mode = GET_MODE (if_info->x); ifalse = INTVAL (if_info->a); itrue = INTVAL (if_info->b); + + /* Make sure we can represent the difference between the two values. */ + if ((itrue - ifalse > 0) + != ((ifalse < 0) != (itrue < 0) ? ifalse < 0 : ifalse < itrue)) + return FALSE; + diff = trunc_int_for_mode (itrue - ifalse, mode); can_reverse = (reversed_comparison_code (if_info->cond, if_info->jump) @@ -2651,6 +2657,7 @@ dead_or_predicable (test_bb, merge_bb, other_bb, new_dest, reversep) probability = BRANCH_EDGE (test_bb)->probability; BRANCH_EDGE (test_bb)->probability = FALLTHRU_EDGE (test_bb)->probability; FALLTHRU_EDGE (test_bb)->probability = probability; + update_br_prob_note (test_bb); } /* Move the insns out of MERGE_BB to before the branch. */