diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-22 21:26:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-22 21:26:15 +0000 |
commit | b81258c278a342b8cbfb6a26f206fc3c82a7834c (patch) | |
tree | 2582465caa5c58ef87e87813826b90d56c24620d /test | |
parent | 0712d55512c986c752b79fc97a360f783c55dedb (diff) | |
download | external_llvm-b81258c278a342b8cbfb6a26f206fc3c82a7834c.zip external_llvm-b81258c278a342b8cbfb6a26f206fc3c82a7834c.tar.gz external_llvm-b81258c278a342b8cbfb6a26f206fc3c82a7834c.tar.bz2 |
Add new testcases for instcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/phi.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/phi.ll b/test/Transforms/InstCombine/phi.ll index e4b1381..52d9157 100644 --- a/test/Transforms/InstCombine/phi.ll +++ b/test/Transforms/InstCombine/phi.ll @@ -26,3 +26,23 @@ BB2: ret int %B } +int %test3(int %A, bool %b) { +BB0: br label %Loop + +Loop: + %B = phi int [%A, %BB0], [%B, %Loop] ; PHI has same value always. + br bool %b, label %Loop, label %Exit +Exit: + ret int %B +} + +int %test3(bool %b) { +BB0: ret int 7 ; Loop is unreachable + +Loop: + %B = phi int [%B, %L2], [%B, %Loop] ; PHI has same value always. + br bool %b, label %L2, label %Loop +L2: + br label %Loop +} + |