[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast-cast-to-and.ll zeroext-and-reduce.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 1 08:14:58 PST 2005



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

cast-cast-to-and.ll added (r1.1)
zeroext-and-reduce.ll added (r1.1)
---
Log message:

New testcases that we should combine.


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

Index: llvm/test/Regression/Transforms/InstCombine/cast-cast-to-and.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/cast-cast-to-and.ll:1.1
*** /dev/null	Sat Jan  1 10:14:56 2005
--- llvm/test/Regression/Transforms/InstCombine/cast-cast-to-and.ll	Sat Jan  1 10:14:46 2005
***************
*** 0 ****
--- 1,8 ----
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep ubyte
+ 
+ int %test1(uint %X) {
+         %Y = cast uint %X to ubyte ;; Turn into an AND
+         %Z = cast ubyte %Y to int
+         ret int %Z
+ }
+ 


Index: llvm/test/Regression/Transforms/InstCombine/zeroext-and-reduce.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/zeroext-and-reduce.ll:1.1
*** /dev/null	Sat Jan  1 10:14:58 2005
--- llvm/test/Regression/Transforms/InstCombine/zeroext-and-reduce.ll	Sat Jan  1 10:14:46 2005
***************
*** 0 ****
--- 1,8 ----
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'and int %Y, 8'
+ 
+ int %test1(ubyte %X) {
+         %Y = cast ubyte %X to int
+         %Z = and int %Y, 65544     ;; Prune this to and Y, 8
+         ret int %Z
+ }
+ 






More information about the llvm-commits mailing list