1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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
This commit is contained in:
Paul Robinson 2019-03-14 23:09:17 +00:00
parent 4d25420fc8
commit 4112c6c281
4 changed files with 11 additions and 9 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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,