xref: /llvm-project/llvm/test/tools/llvm-reduce/remove-function-bodies-comdat.ll (revision 1437a83491cbe4af1b452a3f862a6b609057c26d)
1; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2; RUN: cat %t | FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s
3; RUN: opt -passes=verify %t
4
5; CHECK-FINAL-NOT: = comdat
6; CHECK-INTERESTINGNESS: @callee(
7; CHECK-FINAL: declare void @callee()
8
9$foo = comdat any
10
11define void @callee() comdat($foo) {
12  ret void
13}
14
15; CHECK-ALL: define void @caller()
16define void @caller() {
17entry:
18; CHECK-ALL: call void @callee()
19; CHECK-ALL: ret void
20  call void @callee()
21  ret void
22}
23