summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/add.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-19 15:33:46 +0000
committerChris Lattner <sabre@nondot.org>2003-09-19 15:33:46 +0000
commitb55650aad637b2cdcb727bd0047fafd392a1cc18 (patch)
tree0befbcc7a03062a3b95cf9d80c88b402043fa0ad /test/Transforms/InstCombine/add.ll
parentc6a200efd294ad0d77c136e9704c6d1cc981af23 (diff)
downloadllvm-b55650aad637b2cdcb727bd0047fafd392a1cc18.tar.gz
llvm-b55650aad637b2cdcb727bd0047fafd392a1cc18.tar.bz2
llvm-b55650aad637b2cdcb727bd0047fafd392a1cc18.tar.xz
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/add.ll')
-rw-r--r--test/Transforms/InstCombine/add.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add.ll b/test/Transforms/InstCombine/add.ll
index afcef78ed1..7dcb2aef28 100644
--- a/test/Transforms/InstCombine/add.ll
+++ b/test/Transforms/InstCombine/add.ll
@@ -93,3 +93,15 @@ uint %test14(uint %offset, uint %difference) {
ret uint %tmp.8
}
+ubyte %test15(ubyte %A) {
+ %B = add ubyte %A, 192 ; Does not effect result
+ %C = and ubyte %B, 16 ; Only one bit set
+ ret ubyte %C
+}
+
+ubyte %test16(ubyte %A) {
+ %B = add ubyte %A, 16 ; Turn this into a XOR
+ %C = and ubyte %B, 16 ; Only one bit set
+ ret ubyte %C
+}
+