projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05b402c
)
Add a bunch of tests for ANDs that should be eliminated.
author
Chris Lattner
<sabre@nondot.org>
Sat, 1 Jan 2005 16:13:19 +0000
(16:13 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 1 Jan 2005 16:13:19 +0000
(16:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19216
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/InstCombine/and.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/InstCombine/and.ll
b/test/Transforms/InstCombine/and.ll
index 67b34a3be5e6b32b32e8d385faf4b0b3271d754a..b217c7e39c1c18d542dc3917322e64d7e406ca20 100644
(file)
--- a/
test/Transforms/InstCombine/and.ll
+++ b/
test/Transforms/InstCombine/and.ll
@@
-179,3
+179,16
@@
ubyte %test27(ubyte %A) {
%E = add ubyte %D, 16
ret ubyte %E
}
+
+int %test28(int %X) { ;; This is juse a zero extending shr.
+ %Y = shr int %X, ubyte 24 ;; Sign extend
+ %Z = and int %Y, 255 ;; Mask out sign bits
+ ret int %Z
+}
+
+int %test29(ubyte %X) {
+ %Y = cast ubyte %X to int
+ %Z = and int %Y, 255 ;; Zero extend makes this unneeded.
+ ret int %Z
+}
+