From 35d147ef16192080c370e3c3ea6f1c8e4238da0d Mon Sep 17 00:00:00 2001 From: Terry Guo Date: Wed, 18 Jun 2014 10:11:08 +0000 Subject: [PATCH] re PR target/61544 (ICE due to thumb1_reorg function mishandles label type insn) 2014-06-18 Terry Guo PR target/61544 * config/arm/arm.c (thumb1_reorg): Move to next basic block if we reach the head. From-SVN: r211775 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 39fa9c24ff6c..29c8e529b0ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-06-18 Terry Guo + + PR target/61544 + * config/arm/arm.c (thumb1_reorg): Move to next basic block if we + reach the head. + 2014-06-18 Richard Biener * common.opt (fssa-phiopt): New option. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 85d2114826c8..463707ea2069 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -16946,7 +16946,8 @@ thumb1_reorg (void) insn = PREV_INSN (insn); /* Find the last cbranchsi4_insn in basic block BB. */ - if (INSN_CODE (insn) != CODE_FOR_cbranchsi4_insn) + if (insn == BB_HEAD (bb) + || INSN_CODE (insn) != CODE_FOR_cbranchsi4_insn) continue; /* Get the register with which we are comparing. */ -- 2.47.3