1; RUN: llc -fast-isel-sink-local-values -frame-pointer=all -O0 %s -mtriple x86_64-unknown-linux-gnu -o - | FileCheck %s
2
3; int callme(int);
4; int isel_line_test2() {
5;   callme(400);
6;   return 0;
7; }
8
9define i32 @isel_line_test2(i32 %arg) nounwind uwtable !dbg !5 {
10  ; The stack adjustment should be part of the prologue.
11  ; CHECK: isel_line_test2:
12  ; CHECK: {{subq|leaq}} {{.*}}, %rsp
13  ; CHECK: .loc 1 5 3 prologue_end
14  ; CHECK: movl $400, %edi
15  ; CHECK: callq callme
16entry:
17  ; %arg should get spilled here, so we need to setup a stackframe
18  %call = call i32 @callme(i32 400), !dbg !10
19  ret i32 %arg, !dbg !12
20}
21
22declare i32 @callme(i32)
23
24!llvm.dbg.cu = !{!0}
25!llvm.module.flags = !{!14}
26
27!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 164980) (llvm/trunk 164979)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, globals: !1, imports:  !1)
28!1 = !{}
29!5 = distinct !DISubprogram(name: "isel_line_test2", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 4, file: !13, scope: !6, type: !7, retainedNodes: !1)
30!6 = !DIFile(filename: "bar.c", directory: "/usr/local/google/home/echristo/tmp")
31!7 = !DISubroutineType(types: !8)
32!8 = !{!9}
33!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
34!10 = !DILocation(line: 5, column: 3, scope: !11)
35!11 = distinct !DILexicalBlock(line: 4, column: 1, file: !13, scope: !5)
36!12 = !DILocation(line: 6, column: 3, scope: !11)
37!13 = !DIFile(filename: "bar.c", directory: "/usr/local/google/home/echristo/tmp")
38!14 = !{i32 1, !"Debug Info Version", i32 3}
39