[llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/cmpbge.ll

Chris Lattner sabre at nondot.org
Tue Oct 10 21:00:02 PDT 2006



Changes in directory llvm/test/Regression/CodeGen/Alpha:

cmpbge.ll added (r1.1)
---
Log message:

Both of these functions should turn into cmpbge instructions, even though
the second has an and of 254 not 255.


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

 cmpbge.ll |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)


Index: llvm/test/Regression/CodeGen/Alpha/cmpbge.ll
diff -c /dev/null llvm/test/Regression/CodeGen/Alpha/cmpbge.ll:1.1
*** /dev/null	Tue Oct 10 22:59:58 2006
--- llvm/test/Regression/CodeGen/Alpha/cmpbge.ll	Tue Oct 10 22:59:48 2006
***************
*** 0 ****
--- 1,16 ----
+ ; RUN: llvm-as < %s | llc -march=alpha | grep cmpbge | wc -l | grep 2
+ 
+ bool %test1(ulong %A, ulong %B) {
+ 	%C = and ulong %A, 255
+ 	%D = and ulong %B, 255
+ 	%E = setge ulong %C, %D
+ 	ret bool %E
+ }
+ 
+ bool %test2(ulong %a, ulong %B) {
+ 	%A = shl ulong %a, ubyte 1
+ 	%C = and ulong %A, 254
+ 	%D = and ulong %B, 255
+ 	%E = setge ulong %C, %D
+ 	ret bool %E
+ }






More information about the llvm-commits mailing list