diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2011-01-29 20:35:06 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2011-01-29 20:35:06 +0000 |
| commit | 97a2895e73a0288d9edc896ce3f09674c6f4c61f (patch) | |
| tree | b1bb14affe2bfbcb257d42229612629542ed9ddd /llvm/test/Transforms/ConstProp/constant-expr.ll | |
| parent | 265aa7c070bdb019c880aca348381cc27189ea03 (diff) | |
| download | bcm5719-llvm-97a2895e73a0288d9edc896ce3f09674c6f4c61f.tar.gz bcm5719-llvm-97a2895e73a0288d9edc896ce3f09674c6f4c61f.zip | |
Add the select optimization recently added to instcombine to constant folding.
This is the one where one of the branches of the select is another select on
the same condition.
llvm-svn: 124547
Diffstat (limited to 'llvm/test/Transforms/ConstProp/constant-expr.ll')
| -rw-r--r-- | llvm/test/Transforms/ConstProp/constant-expr.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ConstProp/constant-expr.ll b/llvm/test/Transforms/ConstProp/constant-expr.ll index 33ed1a53c3e..1088fa6959a 100644 --- a/llvm/test/Transforms/ConstProp/constant-expr.ll +++ b/llvm/test/Transforms/ConstProp/constant-expr.ll @@ -100,3 +100,12 @@ ; CHECK: pr9011_14 = constant i128 0 @pr9011_15 = constant i128 bitcast (<4 x i32> zeroinitializer to i128) ; CHECK: pr9011_15 = constant i128 0 + +@select = internal constant + i32 select (i1 icmp ult (i32 ptrtoint (i8* @X to i32), + i32 ptrtoint (i8* @Y to i32)), + i32 select (i1 icmp ult (i32 ptrtoint (i8* @X to i32), + i32 ptrtoint (i8* @Y to i32)), + i32 10, i32 20), + i32 30) +; CHECK: select = internal constant i32 select {{.*}} i32 10, i32 30 |

