[llvm] r309623 - Debug Info: Also check the DWARF output in assembler-only test cases

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 13:48:52 PDT 2017


Author: adrian
Date: Mon Jul 31 13:48:52 2017
New Revision: 309623

URL: http://llvm.org/viewvc/llvm-project?rev=309623&view=rev
Log:
Debug Info: Also check the DWARF output in assembler-only test cases

This will prevent me from introducing a regression in my next commit.

Modified:
    llvm/trunk/test/DebugInfo/ARM/PR16736.ll
    llvm/trunk/test/DebugInfo/X86/dbg-value-frame-index.ll
    llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll
    llvm/trunk/test/DebugInfo/X86/pieces-4.ll

Modified: llvm/trunk/test/DebugInfo/ARM/PR16736.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/ARM/PR16736.ll?rev=309623&r1=309622&r2=309623&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/ARM/PR16736.ll (original)
+++ llvm/trunk/test/DebugInfo/ARM/PR16736.ll Mon Jul 31 13:48:52 2017
@@ -1,5 +1,10 @@
 ; RUN: llc -filetype=asm < %s | FileCheck %s
+; RUN: llc -filetype=obj < %s \
+; RUN:   | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
+;
 ; CHECK: @DEBUG_VALUE: h:x <- [%R{{.*}}+{{.*}}]
+; DWARF: Location description: {{7[0-9] [0-9]+ $}}
+;                              DW_OP_breg. +..
 ; generated from:
 ; clang -cc1 -triple  thumbv7 -S -O1 arm.cpp  -g
 ;

Modified: llvm/trunk/test/DebugInfo/X86/dbg-value-frame-index.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dbg-value-frame-index.ll?rev=309623&r1=309622&r2=309623&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dbg-value-frame-index.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dbg-value-frame-index.ll Mon Jul 31 13:48:52 2017
@@ -1,4 +1,6 @@
 ; RUN: llc -mtriple=x86_64-unknown-unknown -o - %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-unknown-unknown -filetype=obj < %s \
+; RUN:   | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
 
 define i1 @test() !dbg !4 {
 entry:
@@ -19,6 +21,8 @@ while.end:
 
 ; CHECK-LABEL: test
 ; CHECK:       #DEBUG_VALUE: test:w <- [%RSP+8]
+; DWARF:       Location description: 77 08
+;                                    DW_OP_breg7 +8
 
 declare i1 @fn(i64*, i64*, i64*, i8*, i64, i64*, i32*, i8*)
 declare void @llvm.dbg.value(metadata, metadata, metadata)

Modified: llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll?rev=309623&r1=309622&r2=309623&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll Mon Jul 31 13:48:52 2017
@@ -1,4 +1,6 @@
 ; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc  -O0 -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %s \
+; RUN:   | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
 
 ; Verify that we have correct debug info for local variables in code
 ; instrumented with AddressSanitizer.
@@ -28,6 +30,8 @@
 ; CHECK:      .quad .Lfunc_begin0-.Lfunc_begin0
 ; CHECK-NEXT: .quad [[START_LABEL]]-.Lfunc_begin0
 ; CHECK: DW_OP_breg5
+; DWARF: Location description: 75 00 06
+;                              DW_OP_breg5+0 DW_OP_deref
 
 ; Then it's addressed via %rsp:
 ; CHECK:      .quad [[START_LABEL]]-.Lfunc_begin0
@@ -35,6 +39,8 @@
 ; CHECK: DW_OP_breg7
 ; CHECK-NEXT: [[OFFSET]]
 ; CHECK: DW_OP_deref
+; DWARF: Location description: {{77 .. 06 06}}
+;                              DW_OP_breg7+OFFSET DW_OP_deref DW_OP_deref
 
 ; ModuleID = 'test.cc'
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

Modified: llvm/trunk/test/DebugInfo/X86/pieces-4.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pieces-4.ll?rev=309623&r1=309622&r2=309623&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/pieces-4.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/pieces-4.ll Mon Jul 31 13:48:52 2017
@@ -1,4 +1,5 @@
 ; RUN: llc < %s | FileCheck %s
+; RUN: llc -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
 
 ; Compile the following with -O1:
 
@@ -21,6 +22,8 @@
 ; CHECK:               #NO_APP
 ; CHECK:               movl    [[offs]](%rsp), %eax          # 4-byte Reload
 ; CHECK:               retq
+; DWARF: Location description: {{77 .. 93 04 10 00 9f 93 04}}
+; DW_OP_breg7+offs DW_OP_piece 4 DW_OP_constu 0 DW_OP_stack_value DW_OP_piece 4
 
 ; ModuleID = 't.c'
 source_filename = "t.c"




More information about the llvm-commits mailing list