1 ;; Ensure that the MergeFunctions pass creates thunks with the appropriate debug
2 ;; info format set (which would otherwise assert when inlining those thunks).
3 ; RUN: opt -S -passes=mergefunc,inline --try-experimental-debuginfo-iterators < %s | FileCheck %s
14 ;; MergeFunctions will replace f4 with a thunk that calls f3. Inlining will
15 ;; inline f3 into that thunk, which would assert if the thunk had the incorrect
23 ; CHECK-LABEL: define void @f4() {
24 ; CHECK-NEXT: call void @f1()
25 ; CHECK-NEXT: call void @f2()
26 ; CHECK-NEXT: ret void
29 ;; Both of these are interposable, so MergeFunctions will create a common thunk
30 ;; that both will call. Inlining will inline that thunk back, which would assert
31 ;; if the thunk had the incorrect debug info format.
32 define weak void @f5() {
38 define weak void @f6() {
44 ; CHECK-LABEL: define weak void @f6() {
45 ; CHECK-NEXT: call void @f2()
46 ; CHECK-NEXT: call void @f1()
47 ; CHECK-NEXT: ret void
50 ; CHECK-LABEL: define weak void @f5() {
51 ; CHECK-NEXT: call void @f2()
52 ; CHECK-NEXT: call void @f1()
53 ; CHECK-NEXT: ret void