llvm-project/llvm/test/Transforms/SimplifyCFG/debug-info-thread-phi.ll
Jeremy Morse 792a6f8119
[RemoveDIs] Remove "try-debuginfo-iterators..." test flags (#130298)
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).
2025-03-14 15:50:49 +00:00

39 lines
1.1 KiB
LLVM

; RUN: opt %s -passes=debugify,simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
; Tests Bug 37966
define void @bar(i32 %aa) {
; CHECK-LABEL: @bar(
; CHECK: if.end.1.critedge:
; CHECK: br label %if.end.1, !dbg ![[DBG:[0-9]+]]
entry:
%aa.addr = alloca i32, align 4
%bb = alloca i32, align 4
store i32 %aa, ptr %aa.addr, align 4
store i32 0, ptr %bb, align 4
%tobool = icmp ne i32 %aa, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
call void @foo()
br label %if.end
if.end: ; preds = %if.then, %entry
store i32 1, ptr %bb, align 4
br i1 %tobool, label %if.then.1, label %if.end.1 ; "line 10" to -debugify
if.then.1: ; preds = %if.end
call void @foo()
br label %if.end.1
if.end.1: ; preds = %if.then.1, %if.end
store i32 2, ptr %bb, align 4
br label %for.end
for.end: ; preds = %if.end.1
ret void
}
declare void @foo()
; CHECK: ![[DBG]] = !DILocation(line: 10,