summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2019-03-14 23:09:17 +0000
committerPaul Robinson <paul.robinson@sony.com>2019-03-14 23:09:17 +0000
commit96c1f2cd6c82de9816a0b7a1c1e1b2ea1caea4bc (patch)
treeec529f72de5125effd2b95cf350d3daa6e6103a6
parentfb26c329afbe8cf7d55868b3299aed5e63c02868 (diff)
downloadbcm5719-llvm-96c1f2cd6c82de9816a0b7a1c1e1b2ea1caea4bc.tar.gz
bcm5719-llvm-96c1f2cd6c82de9816a0b7a1c1e1b2ea1caea4bc.zip
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. llvm-svn: 356217
-rw-r--r--llvm/test/Transforms/InstMerge/st_sink_check_debug.ll3
-rw-r--r--llvm/test/Transforms/JumpThreading/branch-debug-info.ll8
-rw-r--r--llvm/test/Transforms/SROA/alignment.ll5
-rw-r--r--llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll4
4 files changed, 11 insertions, 9 deletions
diff --git a/llvm/test/Transforms/InstMerge/st_sink_check_debug.ll b/llvm/test/Transforms/InstMerge/st_sink_check_debug.ll
index 94d46a58f4c..3c078919325 100644
--- a/llvm/test/Transforms/InstMerge/st_sink_check_debug.ll
+++ b/llvm/test/Transforms/InstMerge/st_sink_check_debug.ll
@@ -29,4 +29,5 @@ if.end: ; preds = %if.else, %if.then
; 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,
diff --git a/llvm/test/Transforms/JumpThreading/branch-debug-info.ll b/llvm/test/Transforms/JumpThreading/branch-debug-info.ll
index 773ed0f71de..a5226483f67 100644
--- a/llvm/test/Transforms/JumpThreading/branch-debug-info.ll
+++ b/llvm/test/Transforms/JumpThreading/branch-debug-info.ll
@@ -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,
diff --git a/llvm/test/Transforms/SROA/alignment.ll b/llvm/test/Transforms/SROA/alignment.ll
index cbae6be018c..81f8f2a00ba 100644
--- a/llvm/test/Transforms/SROA/alignment.ll
+++ b/llvm/test/Transforms/SROA/alignment.ll
@@ -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
diff --git a/llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll b/llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
index f7e91feb434..c5eb43642bf 100644
--- a/llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
+++ b/llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
@@ -19,7 +19,7 @@ if.then: ; preds = %entry
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: ; preds = %if.end.1
declare void @foo()
-; CHECK: ![[DBG]] = !DILocation(
+; CHECK: ![[DBG]] = !DILocation(line: 10,
OpenPOWER on IntegriCloud