Two new tests for shifts followed by ands
authorChris Lattner <sabre@nondot.org>
Fri, 19 Sep 2003 19:04:43 +0000 (19:04 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 19 Sep 2003 19:04:43 +0000 (19:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8606 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/and.ll

index 5030a66ba7a7b368500cb595b5a8a2cc2fae48f8..3d8cd70a285a7f01ed4f4a62f1273ebb6a251129 100644 (file)
@@ -93,3 +93,15 @@ bool %test14(ubyte %A) {
        %C = setne ubyte %B, 0
        ret bool %C
 }
+
+ubyte %test15(ubyte %A) {
+       %B = shr ubyte %A, ubyte 7
+       %C = and ubyte %B, 2        ; Always equals zero
+       ret ubyte %C
+}
+
+ubyte %test16(ubyte %A) {
+       %B = shl ubyte %A, ubyte 2
+       %C = and ubyte %B, 3
+       ret ubyte %C
+}