blob: 72be4fe559363d61da57e2a76f20d9114136880b [file] [log] [blame]
NAKAMURA Takumi6ea8a942010-11-29 07:58:32 +00001; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
Dan Gohman22e1adb2010-06-07 20:58:11 +00002; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
NAKAMURA Takumi6ea8a942010-11-29 07:58:32 +00003; REQUIRES: loadable_module
Chris Lattneref3d5d02003-06-24 23:40:27 +00004
Tobias Grossere6926692015-07-26 11:37:05 +00005; 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.
Dan Gohmanfa9ad132010-06-07 20:28:37 +00007
Mehdi Aminid178f4f2015-09-16 05:34:32 +00008; CHECK: ModuleID
Dan Gohmanfa9ad132010-06-07 20:28:37 +00009; CHECK-NOT: struct.anon
10%struct.anon = type { i32 }
Chris Lattneref3d5d02003-06-24 23:40:27 +000011
Reid Spencer104b4702007-03-19 18:08:42 +000012declare i32 @test2()
13
Dan Gohmanfb8ed432010-06-07 20:20:33 +000014; CHECK: define void @test() {
Dan Gohmanfa9ad132010-06-07 20:28:37 +000015define i32 @test(i32 %A, %struct.anon* %B, float %C) {
Reid Spencer104b4702007-03-19 18:08:42 +000016 call i32 @test2()
17 ret i32 %1
Chris Lattneref3d5d02003-06-24 23:40:27 +000018}