X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FVerifier%2Finvoke.ll;h=c2750bb121f2861b363da155e3ae2ec6cd05ed1e;hb=318b7cc7f10d41370929ff93274de29c11f87b81;hp=2a0336b03f3b4fe15b572cfa50f2bbb0b6dd4a0a;hpb=917f97c580c3ba16faa291884d6600cf2b275c99;p=oota-llvm.git diff --git a/test/Verifier/invoke.ll b/test/Verifier/invoke.ll index 2a0336b03f3..c2750bb121f 100644 --- a/test/Verifier/invoke.ll +++ b/test/Verifier/invoke.ll @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s -o /dev/null |& FileCheck %s +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s ; PR1042 define i32 @foo() { @@ -19,7 +19,6 @@ L2: ; preds = %0 br label %L L: ; preds = %L2, %L1, %L1 ; CHECK: The unwind destination does not have a landingpad instruction -; CHECK: Instruction does not dominate all uses ret i32 %A } @@ -34,9 +33,12 @@ define void @f1() { entry: ; OK invoke void @llvm.donothing() - to label %cont unwind label %cont + to label %conta unwind label %contb -cont: +conta: + ret void + +contb: %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) filter [0 x i8*] zeroinitializer ret void @@ -63,3 +65,15 @@ entry: %call = call i32 @fn(i8 (i8, i8)* @llvm.expect.i8) ret i32 %call } + +define void @f4() { +entry: + invoke void @llvm.donothing() + to label %cont unwind label %cont + +cont: +; CHECK: Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke. + %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + filter [0 x i8*] zeroinitializer + ret void +}