diff --git a/llvm/test/Transforms/JumpThreading/2008-11-28-InfLoop.ll b/llvm/test/Transforms/JumpThreading/2008-11-28-InfLoop.ll deleted file mode 100644 index 306b2d5435fc..000000000000 --- a/llvm/test/Transforms/JumpThreading/2008-11-28-InfLoop.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: opt < %s -jump-threading -S - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" -target triple = "i386-apple-darwin9.5" - %struct.decContext = type { i32 } - %struct.decNumber = type { i32, i32 } - -define i32 @decNumberPower(%struct.decNumber* %res, %struct.decNumber* %lhs, %struct.decNumber* %rhs, %struct.decContext* %set) nounwind { -entry: - br i1 true, label %decDivideOp.exit, label %bb7.i - -bb7.i: ; preds = %bb7.i, %entry - br label %bb7.i - -decDivideOp.exit: ; preds = %entry - ret i32 undef -} diff --git a/llvm/test/Transforms/JumpThreading/2009-01-08-DeadLoopRepl.ll b/llvm/test/Transforms/JumpThreading/2009-01-08-DeadLoopRepl.ll deleted file mode 100644 index 208c8229875e..000000000000 --- a/llvm/test/Transforms/JumpThreading/2009-01-08-DeadLoopRepl.ll +++ /dev/null @@ -1,49 +0,0 @@ -; RUN: opt < %s -jump-threading | llvm-dis -; PR3298 - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" -target triple = "i386-apple-darwin9.6" - -define i32 @func(i32 %p_79, i32 %p_80) nounwind { -entry: - br label %bb7 - -bb1: ; preds = %bb2 - br label %bb2 - -bb2: ; preds = %bb7, %bb1 - %l_82.0 = phi i8 [ 0, %bb1 ], [ %l_82.1, %bb7 ] ; [#uses=3] - br i1 true, label %bb3, label %bb1 - -bb3: ; preds = %bb2 - %0 = icmp eq i32 %p_80_addr.1, 0 ; [#uses=1] - br i1 %0, label %bb7, label %bb6 - -bb5: ; preds = %bb6 - %1 = icmp eq i8 %l_82.0, 0 ; [#uses=1] - br i1 %1, label %bb1.i, label %bb.i - -bb.i: ; preds = %bb5 - br label %safe_div_func_char_s_s.exit - -bb1.i: ; preds = %bb5 - br label %safe_div_func_char_s_s.exit - -safe_div_func_char_s_s.exit: ; preds = %bb1.i, %bb.i - br label %bb6 - -bb6: ; preds = %safe_div_func_char_s_s.exit, %bb3 - %p_80_addr.0 = phi i32 [ %p_80_addr.1, %bb3 ], [ 1, %safe_div_func_char_s_s.exit ] ; [#uses=2] - %2 = icmp eq i32 %p_80_addr.0, 0 ; [#uses=1] - br i1 %2, label %bb7, label %bb5 - -bb7: ; preds = %bb6, %bb3, %entry - %l_82.1 = phi i8 [ 1, %entry ], [ %l_82.0, %bb3 ], [ %l_82.0, %bb6 ] ; [#uses=2] - %p_80_addr.1 = phi i32 [ 0, %entry ], [ %p_80_addr.1, %bb3 ], [ %p_80_addr.0, %bb6 ] ; [#uses=4] - %3 = icmp eq i32 %p_80_addr.1, 0 ; [#uses=1] - br i1 %3, label %bb8, label %bb2 - -bb8: ; preds = %bb7 - %4 = sext i8 %l_82.1 to i32 ; [#uses=0] - ret i32 0 -} diff --git a/llvm/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll b/llvm/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll deleted file mode 100644 index 05a3ef9017db..000000000000 --- a/llvm/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll +++ /dev/null @@ -1,21 +0,0 @@ -; RUN: opt < %s -jump-threading -S -; PR3353 - -define i32 @test(i8 %X) { -entry: - %Y = add i8 %X, 1 - %Z = add i8 %Y, 1 - br label %bb33.i - -bb33.i: ; preds = %bb33.i, %bb32.i - switch i8 %Y, label %bb32.i [ - i8 39, label %bb35.split.i - i8 13, label %bb33.i - ] - -bb35.split.i: - ret i32 5 -bb32.i: - ret i32 1 -} - diff --git a/llvm/test/Transforms/JumpThreading/crash.ll b/llvm/test/Transforms/JumpThreading/crash.ll index 023c7d01e90f..862b40378bcd 100644 --- a/llvm/test/Transforms/JumpThreading/crash.ll +++ b/llvm/test/Transforms/JumpThreading/crash.ll @@ -88,4 +88,85 @@ D: ret i32 %c E: ret i32 412 -} \ No newline at end of file +} + + +define i32 @test2() nounwind { +entry: + br i1 true, label %decDivideOp.exit, label %bb7.i + +bb7.i: ; preds = %bb7.i, %entry + br label %bb7.i + +decDivideOp.exit: ; preds = %entry + ret i32 undef +} + + +; PR3298 + +define i32 @test3(i32 %p_79, i32 %p_80) nounwind { +entry: + br label %bb7 + +bb1: ; preds = %bb2 + br label %bb2 + +bb2: ; preds = %bb7, %bb1 + %l_82.0 = phi i8 [ 0, %bb1 ], [ %l_82.1, %bb7 ] ; [#uses=3] + br i1 true, label %bb3, label %bb1 + +bb3: ; preds = %bb2 + %0 = icmp eq i32 %p_80_addr.1, 0 ; [#uses=1] + br i1 %0, label %bb7, label %bb6 + +bb5: ; preds = %bb6 + %1 = icmp eq i8 %l_82.0, 0 ; [#uses=1] + br i1 %1, label %bb1.i, label %bb.i + +bb.i: ; preds = %bb5 + br label %safe_div_func_char_s_s.exit + +bb1.i: ; preds = %bb5 + br label %safe_div_func_char_s_s.exit + +safe_div_func_char_s_s.exit: ; preds = %bb1.i, %bb.i + br label %bb6 + +bb6: ; preds = %safe_div_func_char_s_s.exit, %bb3 + %p_80_addr.0 = phi i32 [ %p_80_addr.1, %bb3 ], [ 1, %safe_div_func_char_s_s.exit ] ; [#uses=2] + %2 = icmp eq i32 %p_80_addr.0, 0 ; [#uses=1] + br i1 %2, label %bb7, label %bb5 + +bb7: ; preds = %bb6, %bb3, %entry + %l_82.1 = phi i8 [ 1, %entry ], [ %l_82.0, %bb3 ], [ %l_82.0, %bb6 ] ; [#uses=2] + %p_80_addr.1 = phi i32 [ 0, %entry ], [ %p_80_addr.1, %bb3 ], [ %p_80_addr.0, %bb6 ] ; [#uses=4] + %3 = icmp eq i32 %p_80_addr.1, 0 ; [#uses=1] + br i1 %3, label %bb8, label %bb2 + +bb8: ; preds = %bb7 + %4 = sext i8 %l_82.1 to i32 ; [#uses=0] + ret i32 0 +} + + +; PR3353 + +define i32 @test4(i8 %X) { +entry: + %Y = add i8 %X, 1 + %Z = add i8 %Y, 1 + br label %bb33.i + +bb33.i: ; preds = %bb33.i, %bb32.i + switch i8 %Y, label %bb32.i [ + i8 39, label %bb35.split.i + i8 13, label %bb33.i + ] + +bb35.split.i: + ret i32 5 +bb32.i: + ret i32 1 +} +