diff options
Diffstat (limited to 'llvm/test/Transforms/HotColdSplit')
| -rw-r--r-- | llvm/test/Transforms/HotColdSplit/split-cold-1.ll | 10 | ||||
| -rw-r--r-- | llvm/test/Transforms/HotColdSplit/split-cold-2.ll | 28 |
2 files changed, 29 insertions, 9 deletions
diff --git a/llvm/test/Transforms/HotColdSplit/split-cold-1.ll b/llvm/test/Transforms/HotColdSplit/split-cold-1.ll index c8948bcf1dd..fdb3eb003c6 100644 --- a/llvm/test/Transforms/HotColdSplit/split-cold-1.ll +++ b/llvm/test/Transforms/HotColdSplit/split-cold-1.ll @@ -1,15 +1,9 @@ ; RUN: opt -hotcoldsplit -S < %s | FileCheck %s -source_filename = "bugpoint-output-054409e.bc" -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx10.13.0" - -declare i32 @__gxx_personality_v0(...) ; Outlined function is called from a basic block named codeRepl ; CHECK: codeRepl: ; CHECK-NEXT: call void @foo -; Function Attrs: ssp uwtable -define hidden void @foo() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { +define void @foo() { entry: br i1 undef, label %if.then, label %if.end @@ -28,5 +22,3 @@ cleanup40: ; preds = %if.then12 return: ; preds = %cleanup40 ret void } - - diff --git a/llvm/test/Transforms/HotColdSplit/split-cold-2.ll b/llvm/test/Transforms/HotColdSplit/split-cold-2.ll new file mode 100644 index 00000000000..ce8e7b554d5 --- /dev/null +++ b/llvm/test/Transforms/HotColdSplit/split-cold-2.ll @@ -0,0 +1,28 @@ +; RUN: opt -hotcoldsplit -S < %s + +; Make sure this compiles. This test used to fail with an invalid phi node: the +; two predecessors were outlined and the SSA representation was invalid. + +define void @fun() { +entry: + br i1 undef, label %if.then, label %if.else + +if.then: + unreachable + +if.else: + br label %if.then4 + +if.then4: + br i1 undef, label %if.then5, label %if.end + +if.then5: + br label %cleanup + +if.end: + br label %cleanup + +cleanup: + %cleanup.dest.slot.0 = phi i32 [ 1, %if.then5 ], [ 0, %if.end ] + unreachable +} |

