summaryrefslogtreecommitdiff
path: root/gcc/loop-unswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop-unswitch.c')
-rw-r--r--gcc/loop-unswitch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c
index 96d80c39477..ef4e5b8c2d4 100644
--- a/gcc/loop-unswitch.c
+++ b/gcc/loop-unswitch.c
@@ -223,11 +223,11 @@ may_unswitch_on (basic_block bb, struct loop *loop, rtx *cinsn)
if (at != BB_END (bb))
return NULL_RTX;
- *cinsn = BB_END (bb);
if (!rtx_equal_p (op[0], XEXP (test, 0))
|| !rtx_equal_p (op[1], XEXP (test, 1)))
return NULL_RTX;
+ *cinsn = BB_END (bb);
return test;
}
@@ -266,7 +266,7 @@ unswitch_single_loop (struct loops *loops, struct loop *loop,
basic_block *bbs;
struct loop *nloop;
unsigned i;
- rtx cond, rcond = NULL_RTX, conds, rconds, acond, cinsn = NULL_RTX;
+ rtx cond, rcond = NULL_RTX, conds, rconds, acond, cinsn;
int repeat;
edge e;
@@ -321,6 +321,7 @@ unswitch_single_loop (struct loops *loops, struct loop *loop,
do
{
repeat = 0;
+ cinsn = NULL_RTX;
/* Find a bb to unswitch on. */
bbs = get_loop_body (loop);