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