diff options
Diffstat (limited to 'test/Verifier/SelfReferential.ll')
-rw-r--r-- | test/Verifier/SelfReferential.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Verifier/SelfReferential.ll b/test/Verifier/SelfReferential.ll new file mode 100644 index 00000000000..c24c0ebba3d --- /dev/null +++ b/test/Verifier/SelfReferential.ll @@ -0,0 +1,9 @@ +; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Only PHI nodes may reference their own value" + +; Test that self referential instructions are not allowed + +define void @test() { + %A = add i32 %A, 0 ; <i32> [#uses=1] + ret void +} + |