aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/TailCallElim/debugloc.ll
blob: 7a3a8f90cb6af56d9c061692182a661100410194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: opt < %s -passes=debugify,tailcallelim -S | FileCheck %s

define i32 @foo() {
entry:
; CHECK-LABEL: entry:
; CHECK: br label %tailrecurse{{$}}

  %ret = call i32 @foo()                          ;; line 1
  ret i32 0                                       ;; line 2

; CHECK-LABEL: tailrecurse:
; CHECK: select i1 {{.+}}, !dbg ![[DbgLoc2:[0-9]+]]
; CHECK: br label %tailrecurse, !dbg ![[DbgLoc1:[0-9]+]]
}

;; Make sure tailrecurse has the call instruction's DL
; CHECK: ![[DbgLoc1]] = !DILocation(line: 1
; CHECK: ![[DbgLoc2]] = !DILocation(line: 2