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