summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Bitcode/compatibility.ll23
-rw-r--r--llvm/test/CodeGen/WinEH/wineh-no-demotion.ll16
-rw-r--r--llvm/test/Feature/exception.ll22
-rw-r--r--llvm/test/Transforms/Inline/PR25155.ll53
-rw-r--r--llvm/test/Transforms/LoopStrengthReduce/funclet.ll3
-rw-r--r--llvm/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll16
-rw-r--r--llvm/test/Transforms/SimplifyCFG/empty-cleanuppad.ll55
-rw-r--r--llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll15
8 files changed, 15 insertions, 188 deletions
diff --git a/llvm/test/Bitcode/compatibility.ll b/llvm/test/Bitcode/compatibility.ll
index e2a18ebe131..de0fc137e53 100644
--- a/llvm/test/Bitcode/compatibility.ll
+++ b/llvm/test/Bitcode/compatibility.ll
@@ -774,7 +774,7 @@ entry:
invoke void @f.ccc() to label %normal unwind label %catchswitch3
catchswitch1:
- %cs1 = catchswitch within none [label %catchpad1] unwind label %terminate.1
+ %cs1 = catchswitch within none [label %catchpad1] unwind to caller
catchpad1:
catchpad within %cs1 []
@@ -802,20 +802,9 @@ catchpad3:
cleanuppad1:
%clean.1 = cleanuppad within none []
+ unreachable
; CHECK: %clean.1 = cleanuppad within none []
- invoke void @f.ccc() to label %normal unwind label %terminate.2
-
-terminate.1:
- terminatepad within none [] unwind to caller
- ; CHECK: terminatepad within none [] unwind to caller
-
-terminate.2:
- terminatepad within %clean.1 [i32* %arg1] unwind label %normal.pre
- ; CHECK: terminatepad within %clean.1 [i32* %arg1] unwind label %normal.pre
-
-normal.pre:
- terminatepad within %clean.1 [i32* %arg1, i32* %arg2] unwind to caller
- ; CHECK: terminatepad within %clean.1 [i32* %arg1, i32* %arg2] unwind to caller
+ ; CHECK-NEXT: unreachable
normal:
ret i32 0
@@ -852,8 +841,10 @@ return:
ret i32 0
terminate:
- terminatepad within %cs [] unwind to caller
- ; CHECK: terminatepad within %cs [] unwind to caller
+ cleanuppad within %cs []
+ unreachable
+ ; CHECK: cleanuppad within %cs []
+ ; CHECK-NEXT: unreachable
continue:
ret i32 0
diff --git a/llvm/test/CodeGen/WinEH/wineh-no-demotion.ll b/llvm/test/CodeGen/WinEH/wineh-no-demotion.ll
index 7d18238c003..ab094aeebf5 100644
--- a/llvm/test/CodeGen/WinEH/wineh-no-demotion.ll
+++ b/llvm/test/CodeGen/WinEH/wineh-no-demotion.ll
@@ -93,22 +93,6 @@ exit:
unreachable
}
-; CHECK-LABEL: @test3(
-define void @test3() personality i32 (...)* @__CxxFrameHandler3 {
-entry:
- invoke void @f()
- to label %invoke.cont unwind label %terminate
-
-invoke.cont:
- ret void
-
-terminate:
-; CHECK: cleanuppad within none []
-; CHECK: call void @__std_terminate()
-; CHECK: unreachable
- terminatepad within none [void ()* @__std_terminate] unwind to caller
-}
-
; CHECK-LABEL: @test4(
define void @test4(i1 %x) personality i32 (...)* @__CxxFrameHandler3 {
entry:
diff --git a/llvm/test/Feature/exception.ll b/llvm/test/Feature/exception.ll
index 05dbfe89645..2634692f425 100644
--- a/llvm/test/Feature/exception.ll
+++ b/llvm/test/Feature/exception.ll
@@ -123,28 +123,6 @@ exit:
ret i8 0
}
-define void @terminatepad0() personality i32 (...)* @__gxx_personality_v0 {
-entry:
- br label %try.cont
-
-try.cont:
- invoke void @_Z3quxv() optsize
- to label %try.cont unwind label %bb
-bb:
- terminatepad within none [i7 4] unwind label %bb
-}
-
-define void @terminatepad1() personality i32 (...)* @__gxx_personality_v0 {
-entry:
- br label %try.cont
-
-try.cont:
- invoke void @_Z3quxv() optsize
- to label %try.cont unwind label %bb
-bb:
- terminatepad within none [i7 4] unwind to caller
-}
-
define void @cleanuppad() personality i32 (...)* @__gxx_personality_v0 {
entry:
br label %try.cont
diff --git a/llvm/test/Transforms/Inline/PR25155.ll b/llvm/test/Transforms/Inline/PR25155.ll
deleted file mode 100644
index aed9a58ab3d..00000000000
--- a/llvm/test/Transforms/Inline/PR25155.ll
+++ /dev/null
@@ -1,53 +0,0 @@
-; RUN: opt < %s -inline -S | FileCheck %s
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-pc-windows-msvc18.0.0"
-
-define void @f() personality i32 (...)* @__CxxFrameHandler3 {
-entry:
- invoke void @g()
- to label %try.cont unwind label %catch.dispatch
-
-catch.dispatch: ; preds = %entry
- %cs1 = catchswitch within none [label %catch] unwind to caller
-
-catch: ; preds = %catch.dispatch
- %0 = catchpad within %cs1 [i8* null, i32 64, i8* null]
- invoke void @dtor()
- to label %invoke.cont.1 unwind label %ehcleanup
-
-invoke.cont.1: ; preds = %catch
- catchret from %0 to label %try.cont
-
-try.cont: ; preds = %entry, %invoke.cont.1
- ret void
-
-ehcleanup:
- %cp2 = cleanuppad within none []
- call void @g()
- cleanupret from %cp2 unwind to caller
-}
-
-; CHECK-LABEL: define void @f(
-
-; CHECK: invoke void @g()
-; CHECK: to label %dtor.exit unwind label %terminate.i
-
-; CHECK: terminate.i:
-; CHECK-NEXT: terminatepad within %0 [void ()* @terminate] unwind label %ehcleanup
-
-declare i32 @__CxxFrameHandler3(...)
-
-define internal void @dtor() personality i32 (...)* @__CxxFrameHandler3 {
-entry:
- invoke void @g()
- to label %invoke.cont unwind label %terminate
-
-invoke.cont: ; preds = %entry
- ret void
-
-terminate: ; preds = %entry
- terminatepad within none [void ()* @terminate] unwind to caller
-}
-
-declare void @g()
-declare void @terminate()
diff --git a/llvm/test/Transforms/LoopStrengthReduce/funclet.ll b/llvm/test/Transforms/LoopStrengthReduce/funclet.ll
index a2da3208a38..5d20646141c 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/funclet.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/funclet.ll
@@ -20,9 +20,6 @@ throw: ; preds = %throw, %entry
pad: ; preds = %throw
%phi2 = phi i8* [ %tmp96, %throw ]
- terminatepad within none [] unwind label %blah
-
-blah:
%cs = catchswitch within none [label %unreachable] unwind label %blah2
unreachable:
diff --git a/llvm/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll b/llvm/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll
index f138ac42914..806ca3c17a6 100644
--- a/llvm/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll
+++ b/llvm/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll
@@ -63,14 +63,6 @@ lpad:
resume { i8*, i32 } zeroinitializer
}
-define i8 @call_with_same_range() {
-; CHECK-LABEL: @call_with_same_range
-; CHECK: tail call i8 @call_with_range
- bitcast i8 0 to i8
- %out = call i8 @dummy(), !range !0
- ret i8 %out
-}
-
define i8 @invoke_with_same_range() personality i8* undef {
; CHECK-LABEL: @invoke_with_same_range()
; CHECK: tail call i8 @invoke_with_range()
@@ -84,6 +76,14 @@ lpad:
resume { i8*, i32 } zeroinitializer
}
+define i8 @call_with_same_range() {
+; CHECK-LABEL: @call_with_same_range
+; CHECK: tail call i8 @call_with_range
+ bitcast i8 0 to i8
+ %out = call i8 @dummy(), !range !0
+ ret i8 %out
+}
+
declare i8 @dummy();
diff --git a/llvm/test/Transforms/SimplifyCFG/empty-cleanuppad.ll b/llvm/test/Transforms/SimplifyCFG/empty-cleanuppad.ll
index 0ba29043912..57b36288995 100644
--- a/llvm/test/Transforms/SimplifyCFG/empty-cleanuppad.ll
+++ b/llvm/test/Transforms/SimplifyCFG/empty-cleanuppad.ll
@@ -219,61 +219,6 @@ ehcleanup:
cleanupret from %cp2 unwind to caller
}
-; This tests the case where a terminatepad unwinds to a cleanuppad.
-; I'm not sure how this case would arise, but it seems to be syntactically
-; legal so I'm testing it.
-;
-; CHECK-LABEL: define void @f5()
-; CHECK: entry:
-; CHECK: invoke void @g()
-; CHECK: to label %try.cont unwind label %terminate
-; CHECK: terminate:
-; CHECK: terminatepad within none [i7 4] unwind to caller
-; CHECK-NOT: cleanuppad
-; CHECK: try.cont:
-; CHECK: invoke void @g()
-; CHECK: to label %try.cont.1 unwind label %terminate.1
-; CHECK: terminate.1:
-; CHECK: terminatepad within none [i7 4] unwind label %ehcleanup.2
-; CHECK-NOT: ehcleanup.1:
-; CHECK: ehcleanup.2:
-; CHECK: [[TMP:\%.+]] = cleanuppad
-; CHECK: call void @"\01??1S2@@QEAA@XZ"(%struct.S2* %a)
-; CHECK: cleanupret from [[TMP]] unwind to caller
-; CHECK: }
-define void @f5() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
-entry:
- %a = alloca %struct.S2, align 1
- invoke void @g()
- to label %try.cont unwind label %terminate
-
-terminate: ; preds = %entry
- terminatepad within none [i7 4] unwind label %ehcleanup
-
-ehcleanup: ; preds = %terminate
- %0 = cleanuppad within none []
- cleanupret from %0 unwind to caller
-
-try.cont: ; preds = %entry
- invoke void @g()
- to label %try.cont.1 unwind label %terminate.1
-
-terminate.1: ; preds = %try.cont
- terminatepad within none [i7 4] unwind label %ehcleanup.1
-
-ehcleanup.1: ; preds = %terminate.1
- %1 = cleanuppad within none []
- cleanupret from %1 unwind label %ehcleanup.2
-
-ehcleanup.2: ; preds = %ehcleanup.1
- %2 = cleanuppad within none []
- call void @"\01??1S2@@QEAA@XZ"(%struct.S2* %a)
- cleanupret from %2 unwind to caller
-
-try.cont.1: ; preds = %try.cont
- ret void
-}
-
; This case tests simplification of an otherwise empty cleanup pad that contains
; a PHI node.
;
diff --git a/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll b/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
index aa1feb7b171..670119467da 100644
--- a/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
+++ b/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
@@ -65,21 +65,6 @@ unreachable.unwind:
unreachable
}
-; CHECK-LABEL: define void @test4()
-define void @test4() personality i8* bitcast (void ()* @Personality to i8*) {
-entry:
- invoke void @f()
- to label %exit unwind label %terminate.pad
-terminate.pad:
- ; CHECK: terminatepad within none [] unwind to caller
- terminatepad within none [] unwind label %unreachable.unwind
-exit:
- ret void
-unreachable.unwind:
- cleanuppad within none []
- unreachable
-}
-
; CHECK-LABEL: define void @test5()
define void @test5() personality i8* bitcast (void ()* @Personality to i8*) {
entry:
OpenPOWER on IntegriCloud