2018-12-11 20:05:35 +01:00
|
|
|
; RUN: opt < %s 2>&1 -disable-output \
|
|
|
|
; RUN: -passes=inline -print-before-all -print-after-all | FileCheck %s -check-prefix=INL
|
|
|
|
; RUN: opt < %s 2>&1 -disable-output \
|
|
|
|
; RUN: -passes=inline -print-before-all -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD
|
|
|
|
|
2021-04-14 23:52:50 +02:00
|
|
|
; INL: IR Dump Before InlinerPass on (tester, foo)
|
2018-12-11 20:05:35 +01:00
|
|
|
; INL-NOT: IR Dump After {{InlinerPass}}
|
2021-04-14 23:52:50 +02:00
|
|
|
; INL: IR Dump Before InlinerPass on (tester)
|
|
|
|
; INL: IR Dump After InlinerPass on (tester)
|
2018-12-11 20:05:35 +01:00
|
|
|
|
2021-04-14 23:52:50 +02:00
|
|
|
; INL-MOD: IR Dump Before InlinerPass on (tester, foo)
|
|
|
|
; INL-MOD: IR Dump After InlinerPass on (tester, foo) (invalidated)
|
|
|
|
; INL-MOD: IR Dump Before InlinerPass on (tester)
|
|
|
|
; INL-MOD: IR Dump After InlinerPass on (tester)
|
2018-12-11 20:05:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
define void @tester() noinline {
|
|
|
|
call void @foo()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define internal void @foo() alwaysinline {
|
|
|
|
call void @tester()
|
|
|
|
ret void
|
|
|
|
}
|