[llvm] 67cbd20 - [llvm] Check the debug info line table for basic block sections.

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 12:20:54 PST 2020


Author: Snehasish Kumar
Date: 2020-11-09T12:19:20-08:00
New Revision: 67cbd20469f1e8c4ac238c453a7ed0773c13f76f

URL: https://github.com/llvm/llvm-project/commit/67cbd20469f1e8c4ac238c453a7ed0773c13f76f
DIFF: https://github.com/llvm/llvm-project/commit/67cbd20469f1e8c4ac238c453a7ed0773c13f76f.diff

LOG: [llvm] Check the debug info line table for basic block sections.

Extend the existing basic block sections debug info test to check for the correctness of the generated line table.

Differential Revision: https://reviews.llvm.org/D90989

Added: 
    

Modified: 
    llvm/test/DebugInfo/X86/basic-block-sections_1.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/X86/basic-block-sections_1.ll b/llvm/test/DebugInfo/X86/basic-block-sections_1.ll
index 4db7d20d4ed6..98728d5e8605 100644
--- a/llvm/test/DebugInfo/X86/basic-block-sections_1.ll
+++ b/llvm/test/DebugInfo/X86/basic-block-sections_1.ll
@@ -2,14 +2,15 @@
 ; RUN: llc -O0 %s --basic-block-sections=all --unique-basic-block-section-names -mtriple=x86_64 -filetype=obj -o %t && llvm-dwarfdump -debug-info -v %t | FileCheck --check-prefix=BB-SECTIONS %s
 ; RUN: llc -O0 %s --basic-block-sections=all --unique-basic-block-section-names -mtriple=x86_64 -filetype=obj -split-dwarf-file=%t.dwo -o %t && llvm-dwarfdump -debug-info -v %t | FileCheck --check-prefix=BB-SECTIONS %s
 ; RUN: llc -O0 %s --basic-block-sections=all -mtriple=x86_64 -o - | FileCheck --check-prefix=BB-SECTIONS-ASM %s
+; RUN: llc -O0 %s -mtriple=x86_64 -filetype=obj -o %t && llvm-dwarfdump  -debug-line %t | FileCheck --check-prefix=BB-SECTIONS-LINE-TABLE %s
 
 ; From:
-; int foo(int a) {
-;   if (a > 20)
-;     return 2;
-;   else
-;     return 0;
-; }
+; 1  int foo(int a) {
+; 2    if (a > 20)
+; 3      return 2;
+; 4    else
+; 5      return 0;
+; 6  }
 
 ; NO-SECTIONS: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text")
 ; NO-SECTIONS: DW_AT_high_pc [DW_FORM_data4] ({{.*}})
@@ -47,6 +48,13 @@
 ; BB-SECTIONS-ASM-NEXT:	.quad	.Lfunc_end0
 ; BB-SECTIONS-ASM-NEXT:	.quad	0
 ; BB-SECTIONS-ASM-NEXT:	.quad	0
+; BB-SECTIONS-LINE-TABLE:      0x0000000000000000 1 0 1 0 0 is_stmt
+; BB-SECTIONS-LINE-TABLE-NEXT: 0x0000000000000004 2 9 1 0 0 is_stmt prologue_end
+; BB-SECTIONS-LINE-TABLE-NEXT: 0x0000000000000009 2 7 1 0 0
+; BB-SECTIONS-LINE-TABLE-NEXT: 0x000000000000000b 3 5 1 0 0 is_stmt
+; BB-SECTIONS-LINE-TABLE-NEXT: 0x0000000000000015 5 5 1 0 0 is_stmt
+; BB-SECTIONS-LINE-TABLE-NEXT: 0x000000000000001d 6 1 1 0 0 is_stmt
+; BB-SECTIONS-LINE-TABLE-NEXT: 0x0000000000000022 6 1 1 0 0 is_stmt end_sequence
 
 ; Function Attrs: noinline nounwind optnone uwtable
 define dso_local i32 @_Z3fooi(i32 %0) !dbg !7 {


        


More information about the llvm-commits mailing list