From 4b197b8908a6b5feb789e6301ab12c73b1437042 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Wed, 25 Nov 2009 05:38:41 +0000 Subject: [PATCH] Reverting patch in revision 89758, initial attempt at fixing PR5373 has proven to be bogus. llvm-svn: 89844 --- lib/Transforms/Scalar/LoopUnswitch.cpp | 1 + test/Transforms/LoopUnswitch/5373.ll | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 test/Transforms/LoopUnswitch/5373.ll diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 382e2612cbd..38d267aa6b8 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -296,6 +296,7 @@ static bool isTrivialLoopExitBlockHelper(Loop *L, BasicBlock *BB, // first exit. if (ExitBB != 0) return false; ExitBB = BB; + return true; } // Otherwise, this is an unvisited intra-loop node. Check all successors. diff --git a/test/Transforms/LoopUnswitch/5373.ll b/test/Transforms/LoopUnswitch/5373.ll deleted file mode 100644 index 77b78350c5d..00000000000 --- a/test/Transforms/LoopUnswitch/5373.ll +++ /dev/null @@ -1,24 +0,0 @@ -; RUN: opt < %s -loop-unswitch -stats -disable-output |& grep "3 loop-unswitch - Number of branches unswitched" - -define noalias i32* @func_16(i32** %p_18, i32* %p_20) noreturn nounwind ssp { -entry: - %lnot = icmp eq i32** %p_18, null ; [#uses=1] - %lnot6 = icmp eq i32* %p_20, null ; [#uses=1] - br label %for.body - -for.body: ; preds = %cond.end, %entry - br i1 %lnot, label %cond.end, label %cond.true - -cond.true: ; preds = %for.body - tail call void @f() - unreachable - -cond.end: ; preds = %for.body - br i1 %lnot6, label %for.body, label %cond.true10 - -cond.true10: ; preds = %cond.end - tail call void @f() - unreachable -} - -declare void @f() noreturn