diff options
Diffstat (limited to 'test/Transforms/JumpThreading')
| -rw-r--r-- | test/Transforms/JumpThreading/phi-eq.ll | 2 | ||||
| -rw-r--r-- | test/Transforms/JumpThreading/pr15851_hang.ll | 22 | ||||
| -rw-r--r-- | test/Transforms/JumpThreading/select.ll | 2 |
3 files changed, 24 insertions, 2 deletions
diff --git a/test/Transforms/JumpThreading/phi-eq.ll b/test/Transforms/JumpThreading/phi-eq.ll index 40d3c7edd05d..e05d5ee7c974 100644 --- a/test/Transforms/JumpThreading/phi-eq.ll +++ b/test/Transforms/JumpThreading/phi-eq.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -jump-threading | llvm-dis | FileCheck %s +; RUN: opt < %s -jump-threading -S | FileCheck %s ; Test whether two consecutive switches with identical structures assign the ; proper value to the proper variable. This is really testing ; Instruction::isIdenticalToWhenDefined, as previously that function was diff --git a/test/Transforms/JumpThreading/pr15851_hang.ll b/test/Transforms/JumpThreading/pr15851_hang.ll new file mode 100644 index 000000000000..0484bc9f9dc9 --- /dev/null +++ b/test/Transforms/JumpThreading/pr15851_hang.ll @@ -0,0 +1,22 @@ +; RUN: opt -S -jump-threading < %s | FileCheck %s + +; CHECK-LABEL: @f( +; CHECK-LABEL: entry +; CHECK: ret void +; CHECK-NOT: for.cond1 +; CHECK-NOT: for.body + +define void @f() { +entry: + ret void + +for.cond1: + %i.025 = phi i32 [ %inc, %for.body ], [ %inc, %for.body ], [ 1, %for.cond1 ] + %cmp = icmp slt i32 %i.025, 2 + br i1 %cmp, label %for.body, label %for.cond1 + +for.body: + %inc = add nsw i32 %i.025, 0 + %a = icmp ugt i32 %inc, 2 + br i1 %a, label %for.cond1, label %for.cond1 +} diff --git a/test/Transforms/JumpThreading/select.ll b/test/Transforms/JumpThreading/select.ll index 201e604e0c5e..545e86c082f4 100644 --- a/test/Transforms/JumpThreading/select.ll +++ b/test/Transforms/JumpThreading/select.ll @@ -127,7 +127,7 @@ L4: ; CHECK: test_switch_default ; CHECK: entry: ; CHECK: load -; CHECK: switch +; CHECK: icmp ; CHECK: [[THREADED:[A-Za-z.0-9]+]]: ; CHECK: store ; CHECK: br |
