diff options
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/Inputs/einline.prof | 3 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/early-inline.ll | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SampleProfile/Inputs/einline.prof b/llvm/test/Transforms/SampleProfile/Inputs/einline.prof index 90f41d21ca3..df0275b5005 100644 --- a/llvm/test/Transforms/SampleProfile/Inputs/einline.prof +++ b/llvm/test/Transforms/SampleProfile/Inputs/einline.prof @@ -1,3 +1,6 @@ _Z3foov:200:100 1: _Z3barv:0 3: _Z3barv:100 +recursive:200:100 + 1: recursive:100 + 2: recursive:100 diff --git a/llvm/test/Transforms/SampleProfile/early-inline.ll b/llvm/test/Transforms/SampleProfile/early-inline.ll index 51e7d243c18..a240635b2b8 100644 --- a/llvm/test/Transforms/SampleProfile/early-inline.ll +++ b/llvm/test/Transforms/SampleProfile/early-inline.ll @@ -32,6 +32,19 @@ define internal void @_ZL3barv() !dbg !12 { ret void } +; CHECK-LABEL: @recursive +define void @recursive() !dbg !13 { +; Recursive calls should not be early-inlined. +; CHECK-NOT: call void @recursive +; CHECK: call void @recursive +; CHECK: call void @recursive +; CHECK-NOT: call void @recursive +; CHECK: ret + call void @recursive(), !dbg !14 + call void @recursive(), !dbg !15 + ret void +} + declare i32 @__gxx_personality_v0(...) !llvm.dbg.cu = !{!0} @@ -46,3 +59,6 @@ declare i32 @__gxx_personality_v0(...) !10 = !DILocation(line: 8, column: 5, scope: !11) !11 = distinct !DILexicalBlock(scope: !6, file: !1, line: 7, column: 7) !12 = distinct !DISubprogram(linkageName: "_ZL3barv", scope: !1, file: !1, line: 20, scopeLine: 20, unit: !0) +!13 = distinct !DISubprogram(linkageName: "recursive", scope: !1, file: !1, line: 20, scopeLine: 20, unit: !0) +!14 = !DILocation(line: 21, column: 3, scope: !13) +!15 = !DILocation(line: 22, column: 3, scope: !13) |

