diff options
| author | Nadav Rotem <nadav.rotem@intel.com> | 2011-08-23 17:48:43 +0000 |
|---|---|---|
| committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-08-23 17:48:43 +0000 |
| commit | c78e6607b54a7e1e63ac44a17197d0ea15302bb3 (patch) | |
| tree | ec227a06f839f1360036b25b4a7800f89410e87e /llvm/test/Transforms/InstCombine/bitcast.ll | |
| parent | 9b7bd15d0b865a1fddb3e32254dcd4ef4068b145 (diff) | |
| download | bcm5719-llvm-c78e6607b54a7e1e63ac44a17197d0ea15302bb3.tar.gz bcm5719-llvm-c78e6607b54a7e1e63ac44a17197d0ea15302bb3.zip | |
Address Duncan's CR request:
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector
llvm-svn: 138340
Diffstat (limited to 'llvm/test/Transforms/InstCombine/bitcast.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/bitcast.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/bitcast.ll b/llvm/test/Transforms/InstCombine/bitcast.ll index b0630d27254..899cb4962a3 100644 --- a/llvm/test/Transforms/InstCombine/bitcast.ll +++ b/llvm/test/Transforms/InstCombine/bitcast.ll @@ -113,3 +113,27 @@ define i64 @ISPC0(i64 %in) { ; CHECK: @ISPC0 ; CHECK: ret i64 0 } + + +define i64 @Vec2(i64 %in) { + %out = and i64 %in, xor (i64 bitcast (<4 x i16> <i16 0, i16 0, i16 0, i16 0> to i64), i64 0) + ret i64 %out +; CHECK: @Vec2 +; CHECK: ret i64 0 +} + +define i64 @All11(i64 %in) { + %out = and i64 %in, xor (i64 bitcast (<2 x float> bitcast (i64 -1 to <2 x float>) to i64), i64 -1) + ret i64 %out +; CHECK: @All11 +; CHECK: ret i64 0 +} + + +define i64 @All111(i32 %in) { + %out = and i32 %in, xor (i64 bitcast (<1 x float> bitcast (i32 -1 to <1 x float>) to i32), i32 -1) + ret i32 %out +; CHECK: @All11 +; CHECK: ret i32 0 +} + |

