xref: /llvm-project/llvm/test/BugPoint/remove_arguments_test.ll (revision f75dd8b04c770e5818d304cff13b6ef0e50a9748)
1; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
2; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
3; REQUIRES: plugins
4
5; Test to make sure that arguments are removed from the function if they are
6; unnecessary. And clean up any types that frees up too.
7
8; CHECK: ModuleID
9; CHECK-NOT: struct.anon
10%struct.anon = type { i32 }
11
12declare i32 @test2()
13
14; CHECK: define void @test() {
15define i32 @test(i32 %A, ptr %B, float %C) {
16	call i32 @test2()
17	ret i32 %1
18}
19