From ec6ec6aaabd93cd9018f73d5a9880466eb55b55c Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Mon, 15 Sep 2003 03:55:53 +0200 Subject: re PR rtl-optimization/10914 (unswitch loops does not work on powerpc) 2003-09-12 Zdenek Dvorak PR optimization/10914 * expr.h (get_condition, canonicalize_condition): Declaration changed. * cfgloopanal.c (simple_loop_exit_p): Add parameter to a get_condition and canonicalize_condition calls. * gcse.c (fis_get_condition, delete_null_pointer_checks_1, delete_null_pointer_checks): Ditto. * ifcvt.c (noce_get_alt_condition, noce_get_condition): Ditto. * predict.c (estimate_probability, expected_value_to_br_prob): Ditto. * loop.c (check_dbra_loop, get_condition_for_loop): Ditto. (canonicalize_condition, get_condition): Allow to return comparisons of cc mode registers. * loop-unswitch.c (may_unswitch_on_p, unswitch_single_loop): Allow cc mode registers comparison in condition. From-SVN: r71398 --- gcc/loop-unswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/loop-unswitch.c') diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index b7c7f27..c1971c6 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -141,7 +141,7 @@ may_unswitch_on_p (struct loops *loops, basic_block bb, struct loop *loop, /* Condition must be invariant. We use just a stupid test of invariantness of the condition: all used regs must not be modified inside loop body. */ - test = get_condition (bb->end, NULL); + test = get_condition (bb->end, NULL, true); if (!test) return false; @@ -248,7 +248,7 @@ unswitch_single_loop (struct loops *loops, struct loop *loop, return; } - if (!(cond = get_condition (bbs[i]->end, &split_before))) + if (!(cond = get_condition (bbs[i]->end, &split_before, true))) abort (); rcond = reversed_condition (cond); -- cgit v1.1