[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/and.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 1 08:13:31 PST 2005



Changes in directory llvm/test/Regression/Transforms/InstCombine:

and.ll updated: 1.25 -> 1.26
---
Log message:

Add a bunch of tests for ANDs that should be eliminated.


---
Diffs of the changes:  (+13 -0)

Index: llvm/test/Regression/Transforms/InstCombine/and.ll
diff -u llvm/test/Regression/Transforms/InstCombine/and.ll:1.25 llvm/test/Regression/Transforms/InstCombine/and.ll:1.26
--- llvm/test/Regression/Transforms/InstCombine/and.ll:1.25	Mon Nov 22 13:24:11 2004
+++ llvm/test/Regression/Transforms/InstCombine/and.ll	Sat Jan  1 10:13:19 2005
@@ -179,3 +179,16 @@
 	%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
+}
+






More information about the llvm-commits mailing list