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

Chris Lattner lattner at cs.uiuc.edu
Fri Feb 27 00:28:46 PST 2004


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

canonicalize_branch.ll added (r1.1)

---
Log message:

The instcombiner should canonicalize comparisons.


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

Index: llvm/test/Regression/Transforms/InstCombine/canonicalize_branch.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/canonicalize_branch.ll:1.1
*** /dev/null	Fri Feb 27 00:27:18 2004
--- llvm/test/Regression/Transforms/InstCombine/canonicalize_branch.ll	Fri Feb 27 00:27:07 2004
***************
*** 0 ****
--- 1,27 ----
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'setne\|setle\|setge'
+ 
+ int %test1(uint %X, uint %Y) {
+ 	%C = setne uint %X, %Y
+ 	br bool %C, label %T, label %F
+ T:
+ 	ret int 12
+ F:
+ 	ret int 123
+ }
+ 
+ int %test2(uint %X, uint %Y) {
+ 	%C = setle uint %X, %Y
+ 	br bool %C, label %T, label %F
+ T:
+ 	ret int 12
+ F:
+ 	ret int 123
+ }
+ int %test3(uint %X, uint %Y) {
+ 	%C = setge uint %X, %Y
+ 	br bool %C, label %T, label %F
+ T:
+ 	ret int 12
+ F:
+ 	ret int 123
+ }





More information about the llvm-commits mailing list