64 lines · plain
1; RUN: llc -enable-fs-discriminator -improved-fs-discriminator=false < %s | FileCheck %s --check-prefixes=V0,V012; RUN: llc -enable-fs-discriminator -improved-fs-discriminator=true < %s | FileCheck %s --check-prefixes=V1,V013;4; Check that fs-afdo discriminators are generated.5; V01: .loc 1 7 3 is_stmt 0 discriminator 2 # foo.c:7:36; V01: .loc 1 9 5 is_stmt 1 discriminator 2 # foo.c:9:57; V0: .loc 1 9 5 discriminator 11266 # foo.c:9:58; V0: .loc 1 7 3 is_stmt 1 discriminator 11266 # foo.c:7:39; V1: .loc 1 9 5 discriminator 514 # foo.c:9:510; V1: .loc 1 7 3 is_stmt 1 discriminator 258 # foo.c:7:311; Check that variable __llvm_fs_discriminator__ is generated.12; V01: .type __llvm_fs_discriminator__,@object # @__llvm_fs_discriminator__13; V01: .section .rodata,"a",@progbits14; V01: .weak __llvm_fs_discriminator__15; V01: __llvm_fs_discriminator__:16; V01: .byte 117; V01: .size __llvm_fs_discriminator__, 118 19target triple = "x86_64-unknown-linux-gnu"20 21%struct.Node = type { ptr }22 23define i32 @foo(ptr readonly %node, ptr readnone %root) !dbg !6 {24entry:25 %cmp = icmp eq ptr %node, %root, !dbg !826 br i1 %cmp, label %while.end4, label %while.cond1.preheader.lr.ph, !dbg !1027 28while.cond1.preheader.lr.ph:29 %tobool = icmp eq ptr %node, null30 br i1 %tobool, label %while.cond1.preheader.us.preheader, label %while.body2.preheader, !dbg !1131 32while.body2.preheader:33 br label %while.body2, !dbg !1134 35while.cond1.preheader.us.preheader:36 br label %while.cond1.preheader.us, !dbg !1037 38while.cond1.preheader.us:39 br label %while.cond1.preheader.us, !dbg !1040 41while.body2:42 br label %while.body2, !dbg !1143 44while.end4:45 ret i32 0, !dbg !1246}47 48!llvm.dbg.cu = !{!0}49!llvm.module.flags = !{!3, !4}50 51!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: true, debugInfoForProfiling: true, emissionKind: LineTablesOnly)52!1 = !DIFile(filename: "foo.c", directory: "b/")53!2 = !{}54!3 = !{i32 2, !"Dwarf Version", i32 4}55!4 = !{i32 2, !"Debug Info Version", i32 3}56!5 = !{}57!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 5, type: !7, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)58!7 = !DISubroutineType(types: !2)59!8 = !DILocation(line: 7, column: 15, scope: !9)60!9 = !DILexicalBlockFile(scope: !6, file: !1, discriminator: 2)61!10 = !DILocation(line: 7, column: 3, scope: !9)62!11 = !DILocation(line: 9, column: 5, scope: !9)63!12 = !DILocation(line: 14, column: 3, scope: !6)64