[llvm-branch-commits] [llvm-branch] r84960 - in /llvm/branches/Apple/Leela: lib/CodeGen/BranchFolding.cpp test/CodeGen/CellSPU/2009-01-01-BrCond.ll test/CodeGen/Generic/switch-lower-feature-2.ll
Bill Wendling
isanbard at gmail.com
Fri Oct 23 11:24:29 PDT 2009
Author: void
Date: Fri Oct 23 13:24:29 2009
New Revision: 84960
URL: http://llvm.org/viewvc/llvm-project?rev=84960&view=rev
Log:
$ svn merge -c 84803 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r84803 into '.':
U test/CodeGen/CellSPU/2009-01-01-BrCond.ll
U test/CodeGen/Generic/switch-lower-feature-2.ll
U lib/CodeGen/BranchFolding.cpp
Modified:
llvm/branches/Apple/Leela/lib/CodeGen/BranchFolding.cpp
llvm/branches/Apple/Leela/test/CodeGen/CellSPU/2009-01-01-BrCond.ll
llvm/branches/Apple/Leela/test/CodeGen/Generic/switch-lower-feature-2.ll
Modified: llvm/branches/Apple/Leela/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/BranchFolding.cpp?rev=84960&r1=84959&r2=84960&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/BranchFolding.cpp Fri Oct 23 13:24:29 2009
@@ -945,15 +945,15 @@
}
}
- // If this block doesn't fall through (e.g. it ends with an uncond branch or
- // has no successors) and if the pred falls through into this block, and if
- // it would otherwise fall through into the block after this, move this
- // block to the end of the function.
+ // If this block has no successors (e.g. it is a return block or ends with
+ // a call to a no-return function like abort or __cxa_throw) and if the pred
+ // falls through into this block, and if it would otherwise fall through
+ // into the block after this, move this block to the end of the function.
//
// We consider it more likely that execution will stay in the function (e.g.
// due to loops) than it is to exit it. This asserts in loops etc, moving
// the assert condition out of the loop body.
- if (!PriorCond.empty() && PriorFBB == 0 &&
+ if (MBB->succ_empty() && !PriorCond.empty() && PriorFBB == 0 &&
MachineFunction::iterator(PriorTBB) == FallThrough &&
!CanFallThrough(MBB)) {
bool DoTransform = true;
Modified: llvm/branches/Apple/Leela/test/CodeGen/CellSPU/2009-01-01-BrCond.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/test/CodeGen/CellSPU/2009-01-01-BrCond.ll?rev=84960&r1=84959&r2=84960&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/test/CodeGen/CellSPU/2009-01-01-BrCond.ll (original)
+++ llvm/branches/Apple/Leela/test/CodeGen/CellSPU/2009-01-01-BrCond.ll Fri Oct 23 13:24:29 2009
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=cellspu -o - | grep brz
+; RUN: llc < %s -march=cellspu -o - | grep brnz
; PR3274
target datalayout = "E-p:32:32:128-i1:8:128-i8:8:128-i16:16:128-i32:32:128-i64:32:128-f32:32:128-f64:64:128-v64:64:64-v128:128:128-a0:0:128-s0:128:128"
Modified: llvm/branches/Apple/Leela/test/CodeGen/Generic/switch-lower-feature-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/test/CodeGen/Generic/switch-lower-feature-2.ll?rev=84960&r1=84959&r2=84960&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/test/CodeGen/Generic/switch-lower-feature-2.ll (original)
+++ llvm/branches/Apple/Leela/test/CodeGen/Generic/switch-lower-feature-2.ll Fri Oct 23 13:24:29 2009
@@ -5,9 +5,9 @@
; RUN: grep 1023 %t | count 1
; RUN: grep 119 %t | count 1
; RUN: grep JTI %t | count 2
-; RUN: grep jg %t | count 1
+; RUN: grep jg %t | count 3
; RUN: grep ja %t | count 1
-; RUN: grep js %t | count 1
+; RUN: grep jns %t | count 1
target triple = "i686-pc-linux-gnu"
More information about the llvm-branch-commits
mailing list