llvm-project/llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll

12 lines
308 B
LLVM
Raw Normal View History

2003-07-02 02:52:01 +08:00
; distilled from 255.vortex
; RUN: opt %s -globaldce -S | not grep testfunc
2003-07-02 02:52:01 +08:00
declare i1 ()* @getfunc()
2003-07-02 02:52:01 +08:00
define internal i1 @testfunc() {
%F = call i1 ()* ()* @getfunc( ) ; <i1 ()*> [#uses=1]
%c = icmp eq i1 ()* %F, @testfunc ; <i1> [#uses=1]
ret i1 %c
2003-07-02 02:52:01 +08:00
}