bolt/deps/llvm-18.1.8/llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll
2025-02-14 19:21:04 +01:00

13 lines
295 B
LLVM

; distilled from 255.vortex
; RUN: opt < %s -passes=globaldce -S | FileCheck %s
; CHECK-NOT: testfunc
declare ptr @getfunc()
define internal i1 @testfunc() {
%F = call ptr @getfunc() ; <ptr> [#uses=1]
%c = icmp eq ptr %F, @testfunc ; <i1> [#uses=1]
ret i1 %c
}