llvm/test/Transforms/GlobalDCE/global-ifunc.ll
David Majnemer fea3ecb60c [GlobalDCE, Misc] Don't remove functions referenced by ifuncs
We forgot to consider the target of ifuncs when considering if a
function was alive or dead.

N.B. Also update a few auxiliary tools like bugpoint and
verify-uselistorder.

This fixes PR27593.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268468 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-04 00:20:48 +00:00

14 lines
320 B
LLVM

; RUN: opt -S -globaldce < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@if = ifunc void (), void ()* @fn
define internal void @fn() {
entry:
ret void
}
; CHECK-DAG: @if = ifunc void (), void ()* @fn
; CHECK-DAG: define internal void @fn(