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 | 20a05be15ea5271ab6185b83200fa88263362400 (patch) | |
tree | 11074688c788939245773956dcff96318752fe2f /test/Transforms/InstCombine/bitcast.ll | |
parent | 6153a036f544beb03dfc4d58edc28cf42712743d (diff) | |
download | external_llvm-20a05be15ea5271ab6185b83200fa88263362400.zip external_llvm-20a05be15ea5271ab6185b83200fa88263362400.tar.gz external_llvm-20a05be15ea5271ab6185b83200fa88263362400.tar.bz2 |
Address Duncan's CR request:
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/bitcast.ll')
-rw-r--r-- | test/Transforms/InstCombine/bitcast.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/bitcast.ll b/test/Transforms/InstCombine/bitcast.ll index b0630d2..899cb49 100644 --- a/test/Transforms/InstCombine/bitcast.ll +++ b/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 +} + |