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:
5fbb1f8
)
Add some tests for shr-and folding
author
Chris Lattner
<sabre@nondot.org>
Fri, 24 Sep 2004 15:18:43 +0000
(15:18 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 24 Sep 2004 15:18:43 +0000
(15:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16507
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 703dea3326ccb7e567ec525c4ce86d90c8b5f327..ba30d816df1976d2c9025484dd5fc2be43bf4a35 100644
(file)
--- a/
test/Transforms/InstCombine/and.ll
+++ b/
test/Transforms/InstCombine/and.ll
@@
-119,3
+119,20
@@
bool %test18(int %A) {
ret bool %C
}
+int %test19(int %A) {
+ %B = shl int %A, ubyte 3
+ %C = and int %B, -2 ;; Clearing a zero bit
+ ret int %C
+}
+
+ubyte %test20(ubyte %A) {
+ %C = shr ubyte %A, ubyte 7
+ %D = and ubyte %C, 1 ;; Unneeded
+ ret ubyte %D
+}
+
+sbyte %test21(sbyte %A) {
+ %C = shr sbyte %A, ubyte 7 ;; sign extend
+ %D = and sbyte %C, 1 ;; chop off sign
+ ret sbyte %D
+}