[llvm] r356217 - Tighten up tests that use -debugify as a shortcut. NFC

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 16:09:17 PDT 2019


Author: probinson
Date: Thu Mar 14 16:09:17 2019
New Revision: 356217

URL: http://llvm.org/viewvc/llvm-project?rev=356217&view=rev
Log:
Tighten up tests that use -debugify as a shortcut. NFC

These now verify that a given instruction has a specific source
location, rather than any old location. We want to make sure we
propagate the correct locations from one instruction to another.

Modified:
    llvm/trunk/test/Transforms/InstMerge/st_sink_check_debug.ll
    llvm/trunk/test/Transforms/JumpThreading/branch-debug-info.ll
    llvm/trunk/test/Transforms/SROA/alignment.ll
    llvm/trunk/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll

Modified: llvm/trunk/test/Transforms/InstMerge/st_sink_check_debug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstMerge/st_sink_check_debug.ll?rev=356217&r1=356216&r2=356217&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstMerge/st_sink_check_debug.ll (original)
+++ llvm/trunk/test/Transforms/InstMerge/st_sink_check_debug.ll Thu Mar 14 16:09:17 2019
@@ -29,4 +29,5 @@ if.end:
 
 ; CHECK:      @foo
 ; CHECK:      if.end: ; preds = %if.else, %if.then
-; CHECK-NEXT:   %.sink = phi {{.*}} !dbg
+; CHECK-NEXT:   %.sink = phi {{.*}} !dbg ![[DBG:[0-9]+]]
+; CHECK: ![[DBG]] = !DILocation(line: 0,

Modified: llvm/trunk/test/Transforms/JumpThreading/branch-debug-info.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/JumpThreading/branch-debug-info.ll?rev=356217&r1=356216&r2=356217&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/JumpThreading/branch-debug-info.ll (original)
+++ llvm/trunk/test/Transforms/JumpThreading/branch-debug-info.ll Thu Mar 14 16:09:17 2019
@@ -10,7 +10,7 @@ define void @test0(i32 %i) {
   br i1 %c0, label %left, label %right
 
  left:
-  br i1 %c0, label %left, label %right
+  br i1 %c0, label %left, label %right ; "line 3" to -debugify
 
  right:
   ret void
@@ -27,7 +27,7 @@ define void @test1(i32 %i, i32 %len) {
 
  left:
   %c1 = icmp ult i32 %i, %len
-  br i1 %c1, label %right, label %left0
+  br i1 %c1, label %right, label %left0 ; "line 9" to -debugify
 
  left0:
   ret void
@@ -36,6 +36,6 @@ define void @test1(i32 %i, i32 %len) {
   ret void
 }
 
-; CHECK-DAG: ![[DBG0]] = !DILocation(
-; CHECK-DAG: ![[DBG1]] = !DILocation(
+; CHECK-DAG: ![[DBG0]] = !DILocation(line: 3,
+; CHECK-DAG: ![[DBG1]] = !DILocation(line: 9,
 

Modified: llvm/trunk/test/Transforms/SROA/alignment.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SROA/alignment.ll?rev=356217&r1=356216&r2=356217&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SROA/alignment.ll (original)
+++ llvm/trunk/test/Transforms/SROA/alignment.ll Thu Mar 14 16:09:17 2019
@@ -41,11 +41,12 @@ define void @test2() {
 ; it preserves the original DebugLocation.
 ; DEBUGLOC-LABEL: @test2(
 ; DEBUGLOC: {{.*}} = alloca {{.*}} !dbg ![[DbgLoc:[0-9]+]]
+; DEBUGLOC-LABEL: }
 ;
-; DEBUGLOC: ![[DbgLoc]] = !DILocation(
+; DEBUGLOC: ![[DbgLoc]] = !DILocation(line: 9,
 
 entry:
-  %a = alloca { i8, i8, i8, i8 }, align 2
+  %a = alloca { i8, i8, i8, i8 }, align 2      ; "line 9" to -debugify
   %gep1 = getelementptr { i8, i8, i8, i8 }, { i8, i8, i8, i8 }* %a, i32 0, i32 1
   %cast1 = bitcast i8* %gep1 to i16*
   store volatile i16 0, i16* %cast1

Modified: llvm/trunk/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll?rev=356217&r1=356216&r2=356217&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll Thu Mar 14 16:09:17 2019
@@ -19,7 +19,7 @@ if.then:
 
 if.end:                                           ; preds = %if.then, %entry
   store i32 1, i32* %bb, align 4
-  br i1 %tobool, label %if.then.1, label %if.end.1
+  br i1 %tobool, label %if.then.1, label %if.end.1 ; "line 10" to -debugify
 
 if.then.1:                                        ; preds = %if.end
   call void @foo()
@@ -35,4 +35,4 @@ for.end:
 
 declare void @foo()
 
-; CHECK: ![[DBG]] = !DILocation(
+; CHECK: ![[DBG]] = !DILocation(line: 10,




More information about the llvm-commits mailing list