diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-18 17:44:58 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-18 17:44:58 +0000 |
commit | 7397b2c7513332afdcb7446e9a9816c98dd1bb1e (patch) | |
tree | f33aa9057bfb19fb240d3817f86aab30299c91d6 | |
parent | 550c25e9746c298012aa71ba3f6ecaecf7fbd243 (diff) |
add test case for bugfix in r157032
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157058 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/CorrelatedValuePropagation/range.ll | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/Transforms/CorrelatedValuePropagation/range.ll b/test/Transforms/CorrelatedValuePropagation/range.ll index 9b70ed200e..2bb21874ce 100644 --- a/test/Transforms/CorrelatedValuePropagation/range.ll +++ b/test/Transforms/CorrelatedValuePropagation/range.ll @@ -41,3 +41,32 @@ end: ; CHECK: then: ; CHECK-NEXT: br i1 false, label %end, label %else } + +; CHECK: @test3 +define i32 @test3(i32 %c) nounwind { + %cmp = icmp slt i32 %c, 2 + br i1 %cmp, label %if.then, label %if.end + +if.then: + ret i32 1 + +if.end: + %cmp1 = icmp slt i32 %c, 3 + br i1 %cmp1, label %if.then2, label %if.end8 + +; CHECK: if.then2 +if.then2: + %cmp2 = icmp eq i32 %c, 2 +; CHECK: br i1 true + br i1 %cmp2, label %if.then4, label %if.end6 + +; CHECK: if.end6 +if.end6: + ret i32 2 + +if.then4: + ret i32 3 + +if.end8: + ret i32 4 +} |