1 ; RUN: opt < %s -argpromotion -S | FileCheck %s 2 ; RUN: opt < %s -passes=argpromotion -S | FileCheck %s 3 4 declare void @sink(i32) 5 6 ; CHECK: define internal void @test({{.*}} !dbg [[SP:![0-9]+]] 7 define internal void @test(i32** %X) !dbg !2 { 8 %1 = load i32*, i32** %X, align 8 9 %2 = load i32, i32* %1, align 8 10 call void @sink(i32 %2) 11 ret void 12 } 13 14 define void @caller(i32** %Y) { 15 ; CHECK: call void @test(i32 % 16 call void @test(i32** %Y) 17 ret void 18 } 19 20 ; CHECK: [[SP]] = distinct !DISubprogram(name: "test", 21 22 !llvm.module.flags = !{!0} 23 !llvm.dbg.cu = !{!3} 24 25 !0 = !{i32 2, !"Debug Info Version", i32 3} 26 !1 = !DILocation(line: 8, scope: !2) 27 !2 = distinct !DISubprogram(name: "test", file: !5, line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null) 28 !3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5) 29 !5 = !DIFile(filename: "test.c", directory: "") 30