llvm-project/llvm/test/Verifier/SelfReferential.ll

11 lines
243 B
LLVM
Raw Normal View History

; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
; CHECK: Only PHI nodes may reference their own value
2004-11-07 07:08:26 +08:00
2002-04-19 04:30:58 +08:00
; Test that self referential instructions are not allowed
2008-03-01 17:00:21 +08:00
define void @test() {
%A = add i32 %A, 0 ; <i32> [#uses=1]
2002-04-19 04:30:58 +08:00
ret void
2008-03-01 17:00:21 +08:00
}