Files
clang-p2996/llvm/test/Transforms/MergeFunc/debuginfo-iterators.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

55 lines
1.4 KiB
LLVM

; RUN: opt -S -passes=mergefunc,inline --experimental-debuginfo-iterators < %s | FileCheck %s
;; Ensure that the MergeFunctions pass creates thunks with the appropriate debug
;; info format set (which would otherwise assert when inlining those thunks).
declare void @f1()
declare void @f2()
define void @f3() {
call void @f1()
call void @f2()
ret void
}
;; MergeFunctions will replace f4 with a thunk that calls f3. Inlining will
;; inline f3 into that thunk, which would assert if the thunk had the incorrect
;; debug info format.
define void @f4() {
call void @f1()
call void @f2()
ret void
}
; CHECK-LABEL: define void @f4() {
; CHECK-NEXT: call void @f1()
; CHECK-NEXT: call void @f2()
; CHECK-NEXT: ret void
; CHECK-NEXT: }
;; Both of these are interposable, so MergeFunctions will create a common thunk
;; that both will call. Inlining will inline that thunk back, which would assert
;; if the thunk had the incorrect debug info format.
define weak void @f5() {
call void @f2()
call void @f1()
ret void
}
define weak void @f6() {
call void @f2()
call void @f1()
ret void
}
; CHECK-LABEL: define weak void @f6() {
; CHECK-NEXT: call void @f2()
; CHECK-NEXT: call void @f1()
; CHECK-NEXT: ret void
; CHECK-NEXT: }
; CHECK-LABEL: define weak void @f5() {
; CHECK-NEXT: call void @f2()
; CHECK-NEXT: call void @f1()
; CHECK-NEXT: ret void
; CHECK-NEXT: }