mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Dan noticed that the verifier wasn't thoroughly checking uses of
invoke results (see the testcases). Tighten up the checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
15
test/Verifier/2009-05-29-InvokeResult1.ll
Normal file
15
test/Verifier/2009-05-29-InvokeResult1.ll
Normal file
@@ -0,0 +1,15 @@
|
||||
; RUN: not llvm-as < %s >& /dev/null
|
||||
|
||||
declare i32 @v()
|
||||
|
||||
define i32 @f() {
|
||||
e:
|
||||
%r = invoke i32 @v()
|
||||
to label %c unwind label %u ; <i32> [#uses=2]
|
||||
|
||||
c: ; preds = %e
|
||||
ret i32 %r
|
||||
|
||||
u: ; preds = %e
|
||||
ret i32 %r
|
||||
}
|
16
test/Verifier/2009-05-29-InvokeResult2.ll
Normal file
16
test/Verifier/2009-05-29-InvokeResult2.ll
Normal file
@@ -0,0 +1,16 @@
|
||||
; RUN: not llvm-as < %s >& /dev/null
|
||||
|
||||
declare i32 @v()
|
||||
|
||||
define i32 @g() {
|
||||
e:
|
||||
%s = invoke i32 @v()
|
||||
to label %c unwind label %u ; <i32> [#uses=2]
|
||||
|
||||
c: ; preds = %e
|
||||
ret i32 %s
|
||||
|
||||
u: ; preds = %e
|
||||
%t = phi i32 [ %s, %e ] ; <i32> [#uses=1]
|
||||
ret i32 %t
|
||||
}
|
19
test/Verifier/2009-05-29-InvokeResult3.ll
Normal file
19
test/Verifier/2009-05-29-InvokeResult3.ll
Normal file
@@ -0,0 +1,19 @@
|
||||
; RUN: not llvm-as < %s >& /dev/null
|
||||
|
||||
declare i32 @v()
|
||||
|
||||
define i32 @h() {
|
||||
e:
|
||||
%s = invoke i32 @v()
|
||||
to label %c unwind label %u ; <i32> [#uses=2]
|
||||
|
||||
c: ; preds = %e
|
||||
br label %d
|
||||
|
||||
d: ; preds = %u, %c
|
||||
%p = phi i32 [ %s, %c ], [ %s, %u ] ; <i32> [#uses=1]
|
||||
ret i32 %p
|
||||
|
||||
u: ; preds = %e
|
||||
br label %d
|
||||
}
|
Reference in New Issue
Block a user