From 5bc93e782e5e2ef33adeb8b395484d2c190abda1 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 30 Sep 2011 17:00:34 +0000 Subject: [PATCH] Add forgotten tests that the cleanup flag is cleared if there is a catch-all landingpad clause. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140858 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../InstCombine/LandingPadClauses.ll | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/Transforms/InstCombine/LandingPadClauses.ll b/test/Transforms/InstCombine/LandingPadClauses.ll index e96bf4c7f4c..055bdcc81b5 100644 --- a/test/Transforms/InstCombine/LandingPadClauses.ll +++ b/test/Transforms/InstCombine/LandingPadClauses.ll @@ -35,6 +35,9 @@ cont.g: invoke void @bar() to label %cont.h unwind label %lpad.h cont.h: + invoke void @bar() + to label %cont.i unwind label %lpad.i +cont.i: ret void lpad.a: @@ -115,6 +118,15 @@ lpad.h: ; CHECK: %h = landingpad ; CHECK-NEXT: filter [1 x i32*] zeroinitializer ; CHECK-NEXT: unreachable + +lpad.i: + %i = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + cleanup + filter [0 x i32*] zeroinitializer + unreachable +; CHECK: %i = landingpad +; CHECK-NEXT: filter +; CHECK-NEXT: unreachable } define void @foo_cxx() { @@ -128,6 +140,9 @@ cont.b: invoke void @bar() to label %cont.c unwind label %lpad.c cont.c: + invoke void @bar() + to label %cont.d unwind label %lpad.d +cont.d: ret void lpad.a: @@ -154,4 +169,13 @@ lpad.c: ; CHECK: %c = landingpad ; CHECK-NEXT: cleanup ; CHECK-NEXT: unreachable + +lpad.d: + %d = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + cleanup + catch i32* null + unreachable +; CHECK: %d = landingpad +; CHECK-NEXT: null +; CHECK-NEXT: unreachable }