diff options
Diffstat (limited to 'llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll')
| -rw-r--r-- | llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll b/llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll index 8622f03b2ed..448e63ab1de 100644 --- a/llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll +++ b/llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll @@ -43,6 +43,37 @@ entry: br i1 undef, label %if.then, label %if.end if.then: ; preds = %entry + call void @sink() + br label %if.end + +if.end: ; preds = %entry + ret void +} + +; Do not split `noinline` functions. +; CHECK-LABEL: @noinline_func +; CHECK-NOT: noinline_func.cold.1 +define void @noinline_func() noinline { +entry: + br i1 undef, label %if.then, label %if.end + +if.then: ; preds = %entry + call void @sink() + br label %if.end + +if.end: ; preds = %entry + ret void +} + +; Do not split `alwaysinline` functions. +; CHECK-LABEL: @alwaysinline_func +; CHECK-NOT: alwaysinline_func.cold.1 +define void @alwaysinline_func() alwaysinline { +entry: + br i1 undef, label %if.then, label %if.end + +if.then: ; preds = %entry + call void @sink() br label %if.end if.end: ; preds = %entry |

