[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 17 14:30:02 PDT 2003


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

2003-08-17-BranchFold.ll added (r1.1)

---
Log message:

New testcase


---
Diffs of the changes:

Index: llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll:1.1
*** /dev/null	Sun Aug 17 14:29:44 2003
--- llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll	Sun Aug 17 14:29:34 2003
***************
*** 0 ****
--- 1,20 ----
+ ; This test checks to make sure that 'br X, Dest, Dest' is folded into 
+ ; 'br Dest'
+ 
+ ; RUN: as < %s | opt -simplifycfg | dis | not grep 'br bool %c2'
+ 
+ declare void %noop()
+ 
+ int %test(bool %c1, bool %c2) {
+ 	call void %noop()
+ 	br bool %c1, label %A, label %Y
+ A:
+ 	call void %noop()
+  	br bool %c2, label %X, label %X   ; Can be converted to unconditional br
+ X:
+ 	call void %noop()
+ 	ret int 0
+ Y:
+ 	call void %noop()
+ 	br label %X
+ }





More information about the llvm-commits mailing list