summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-01-05 06:27:50 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-01-05 06:27:50 +0000
commit2fa8651a8f8df602f62b7074168dfb4b1d1a3fde (patch)
tree35b992eb273f796dfe9352ff6e49ce80f617534a /llvm/test
parent905042774df1c784ff898154553b5cca40c46822 (diff)
downloadbcm5719-llvm-2fa8651a8f8df602f62b7074168dfb4b1d1a3fde.tar.gz
bcm5719-llvm-2fa8651a8f8df602f62b7074168dfb4b1d1a3fde.zip
[SimplifyCFG] Remove redundant catchpads
Remove duplicate catchpad handlers from a catchswitch. llvm-svn: 256814
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll b/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
index 670119467da..d871e17b6b0 100644
--- a/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
+++ b/llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
@@ -81,3 +81,21 @@ catch.body:
exit:
unreachable
}
+
+; CHECK-LABEL: define void @test6()
+define void @test6() personality i8* bitcast (void ()* @Personality to i8*) {
+entry:
+ invoke void @f()
+ to label %exit unwind label %catch.pad
+
+catch.pad:
+ %cs1 = catchswitch within none [label %catch.body, label %catch.body] unwind to caller
+ ; CHECK: catchswitch within none [label %catch.body] unwind to caller
+
+catch.body:
+ %catch = catchpad within %cs1 [i8* null, i32 0, i8* null]
+ catchret from %catch to label %exit
+
+exit:
+ ret void
+}
OpenPOWER on IntegriCloud