]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
final.c (compute_alignments): Do not apply loop alignment to a block falling through...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 16 Apr 2014 23:31:30 +0000 (23:31 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 16 Apr 2014 23:31:30 +0000 (23:31 +0000)
* final.c (compute_alignments): Do not apply loop alignment to a block
falling through to the exit.

From-SVN: r209451

gcc/ChangeLog
gcc/final.c

index fe2d1edc1dd4648013ff219decf56e5ac88af715..7865b8ac13f652518cef48dac01bb5b98b1aa7d8 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-16  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * final.c (compute_alignments): Do not apply loop alignment to a block
+       falling through to the exit.
+
 2014-04-16  Catherine Moore  <clm@codesourcery.com>
 
        * mips.md (*mov<mode>_internal, *movhi_internal, *movqi_internal):
index 83abee20873e55e82d845b3eac2c13b2f18ab2b2..b4b96b973013b7208fc82f0ccb25db8923db68de 100644 (file)
@@ -775,6 +775,8 @@ compute_alignments (void)
       /* In case block is frequent and reached mostly by non-fallthru edge,
         align it.  It is most likely a first block of loop.  */
       if (has_fallthru
+         && !(single_succ_p (bb)
+              && single_succ (bb) == EXIT_BLOCK_PTR_FOR_FN (cfun))
          && optimize_bb_for_speed_p (bb)
          && branch_frequency + fallthru_frequency > freq_threshold
          && (branch_frequency