These date back to when the non-intrinsic format of variable locations was still being tested and was behind a compile-time flag, so not all builds / bots would correctly run them. The solution at the time, to get at least some test coverage, was to have tests opt-in to non-intrinsic debug-info if it was built into LLVM. Nowadays, non-intrinsic format is the default and has been on for more than a year, there's no need for this flag to exist. (I've downgraded the flag from "try" to explicitly requesting non-intrinsic format in some places, so that we can deal with tests that are explicitly about non-intrinsic format in their own commit).
27 lines
1007 B
LLVM
27 lines
1007 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -passes='debugify,function(loop-mssa(licm))' -S | FileCheck %s
|
|
|
|
%Ty = type { i32, i32 }
|
|
@X2 = external global %Ty
|
|
|
|
; The GEP in dead1 is adding a zero offset, so the DIExpression can be kept as
|
|
; a "register location".
|
|
; The GEP in dead2 is adding a 4 bytes to the pointer, so the DIExpression is
|
|
; turned into an "implicit location" using DW_OP_stack_value.
|
|
define void @test11() {
|
|
; CHECK-LABEL: @test11(
|
|
; CHECK-NEXT: br label [[LOOP:%.*]], !dbg [[DBG11:![0-9]+]]
|
|
; CHECK: Loop:
|
|
; CHECK-NEXT: #dbg_value(ptr @X2, [[META9:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value), [[META12:![0-9]+]])
|
|
; CHECK-NEXT: br i1 false, label [[LOOP]], label [[OUT:%.*]], !dbg [[DBG13:![0-9]+]]
|
|
; CHECK: Out:
|
|
; CHECK-NEXT: ret void, !dbg [[DBG14:![0-9]+]]
|
|
;
|
|
br label %Loop
|
|
Loop:
|
|
%dead2 = getelementptr %Ty, ptr @X2, i64 0, i32 1
|
|
br i1 false, label %Loop, label %Out
|
|
Out:
|
|
ret void
|
|
}
|