xref: /llvm-project/llvm/test/tools/llvm-reduce/no-remove-ifunc-function.ll (revision 8e3e218a5fb64deda325f93a6cdebefbccf205a3)
1; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=functions --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2; RUN: FileCheck --check-prefixes=CHECK-FINAL --input-file=%t %s
3
4; Test handling of ifunc. Make sure function reduction doesn't create
5; invalid ifunc
6
7
8; CHECK-INTERESTINGNESS: define void @no_ifunc_interesting
9
10; CHECK-FINAL: @ifunc1 = ifunc void (), ptr @has_ifunc
11; CHECK-FINAL: define void @no_ifunc_interesting() {
12; CHECK-FINAL-NOT: define
13
14@ifunc1 = ifunc void (), ptr @has_ifunc
15
16
17define ptr @has_ifunc() {
18  ret ptr inttoptr (i64 124 to ptr)
19}
20
21define void @no_ifunc_interesting() {
22  ret void
23}
24
25define void @no_ifunc_boring() {
26  ret void
27}
28