diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-01-16 02:11:43 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-01-16 02:11:43 +0000 |
commit | 4e56ab2cf4ef7dc693b6110df60ce2a07187868f (patch) | |
tree | 20449b7813fb2b6fe368b2d79aa71440ceff5ec3 /test/Transforms | |
parent | 05aae18165a41e2bb0e7de0eba2656cc5537b162 (diff) | |
download | external_llvm-4e56ab2cf4ef7dc693b6110df60ce2a07187868f.zip external_llvm-4e56ab2cf4ef7dc693b6110df60ce2a07187868f.tar.gz external_llvm-4e56ab2cf4ef7dc693b6110df60ce2a07187868f.tar.bz2 |
Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/cast.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index 9361ff2..7a1e7a8 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -254,3 +254,10 @@ define i1 @test37(i32 %a) { ret i1 %e } +define i64 @test38(i32 %a) { + %1 = icmp eq i32 %a, -2 + %2 = zext i1 %1 to i8 + %3 = xor i8 %2, 1 + %4 = zext i8 %3 to i64 + ret i64 %4 +} |