brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 1898599 Raw
75 lines · plain
1; RUN: llc -mtriple=i386-unknown-unknown -mcpu=core2 %s -o %t -filetype=obj2; RUN: llvm-dwarfdump -debug-line %t | FileCheck %s3;4; Generated from:5;6; #1 void foo(int);7; #2 void baz(int i) {8; #3   if (i) {foo(i+1);/*discriminator 1*/}9; #4 }10;11; The intent is to test discriminator 1 generated for all instructions in12; the taken branch.13 14; Function Attrs: uwtable15define void @_Z3bazi(i32) #0 !dbg !6 {16  %2 = alloca i32, align 417  store i32 %0, ptr %2, align 418  call void @llvm.dbg.declare(metadata ptr %2, metadata !10, metadata !11), !dbg !1219  %3 = load i32, ptr %2, align 4, !dbg !1320  %4 = icmp ne i32 %3, 0, !dbg !1321  br i1 %4, label %5, label %8, !dbg !1522 23; <label>:5:                                      ; preds = %124  %6 = load i32, ptr %2, align 4, !dbg !1625  %7 = add nsw i32 %6, 1, !dbg !1926  call void @_Z3fooi(i32 %7), !dbg !2027  br label %8, !dbg !2128 29; <label>:8:                                      ; preds = %5, %130  ret void, !dbg !2231}32 33; Function Attrs: nounwind readnone34declare void @llvm.dbg.declare(metadata, metadata, metadata) #135 36declare void @_Z3fooi(i32) #237 38attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }39attributes #1 = { nounwind readnone }40attributes #2 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }41 42!llvm.dbg.cu = !{!0}43!llvm.module.flags = !{!3, !4}44!llvm.ident = !{!5}45 46!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 267518)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)47!1 = !DIFile(filename: "test.cc", directory: ".")48!2 = !{}49!3 = !{i32 2, !"Dwarf Version", i32 4}50!4 = !{i32 2, !"Debug Info Version", i32 3}51!5 = !{!"clang version 3.9.0 (trunk 267518)"}52!6 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazi", scope: !1, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)53!7 = !DISubroutineType(types: !8)54!8 = !{null, !9}55!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)56!10 = !DILocalVariable(name: "i", arg: 1, scope: !6, file: !1, line: 2, type: !9)57!11 = !DIExpression()58!12 = !DILocation(line: 2, column: 14, scope: !6)59!13 = !DILocation(line: 3, column: 7, scope: !14)60!14 = distinct !DILexicalBlock(scope: !6, file: !1, line: 3, column: 7)61!15 = !DILocation(line: 3, column: 7, scope: !6)62!16 = !DILocation(line: 3, column: 15, scope: !17)63!17 = !DILexicalBlockFile(scope: !18, file: !1, discriminator: 1)64!18 = distinct !DILexicalBlock(scope: !14, file: !1, line: 3, column: 10)65!19 = !DILocation(line: 3, column: 16, scope: !17)66!20 = !DILocation(line: 3, column: 11, scope: !17)67!21 = !DILocation(line: 3, column: 21, scope: !17)68!22 = !DILocation(line: 4, column: 1, scope: !6)69 70; CHECK: Address            Line   Column File   ISA Discriminator OpIndex Flags71; CHECK: ------------------ ------ ------ ------ --- ------------- ------- -------------72; CHECK: {{.*}}                  3     15      1   0             1       073; CHECK: {{.*}}                  3     16      1   0             1       074; CHECK: {{.*}}                  3     11      1   0             1       075