diff options
| author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-08-03 20:27:13 +0000 |
|---|---|---|
| committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-08-03 20:27:13 +0000 |
| commit | 4dfe279e00d56f23c37a526b3abe0a7c89269fa7 (patch) | |
| tree | a08e638a3fc43e5602fe7fc3824ef1db428ade72 /llvm/test/Transforms/TailCallElim/debugloc.ll | |
| parent | bde9cf942b7c914b3774424d41b771c44d2d71e4 (diff) | |
| download | bcm5719-llvm-4dfe279e00d56f23c37a526b3abe0a7c89269fa7.tar.gz bcm5719-llvm-4dfe279e00d56f23c37a526b3abe0a7c89269fa7.zip | |
[TRE][DebugInfo] Preserve Debug Location in new branch instruction
There are two branch instructions created
so the new test covers them both.
Differential Revision: https://reviews.llvm.org/D50263
llvm-svn: 338917
Diffstat (limited to 'llvm/test/Transforms/TailCallElim/debugloc.ll')
| -rw-r--r-- | llvm/test/Transforms/TailCallElim/debugloc.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/TailCallElim/debugloc.ll b/llvm/test/Transforms/TailCallElim/debugloc.ll new file mode 100644 index 00000000000..412dd04b621 --- /dev/null +++ b/llvm/test/Transforms/TailCallElim/debugloc.ll @@ -0,0 +1,16 @@ +; RUN: opt < %s -debugify -tailcallelim -S | FileCheck %s + +define void @foo() { +entry: +; CHECK-LABEL: entry: +; CHECK: br label %tailrecurse, !dbg ![[DbgLoc:[0-9]+]] + + call void @foo() ;; line 1 + ret void + +; CHECK-LABEL: tailrecurse: +; CHECK: br label %tailrecurse, !dbg ![[DbgLoc]] +} + +;; Make sure tailrecurse has the call instruction's DL +; CHECK: ![[DbgLoc]] = !DILocation(line: 1 |

