[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/PhiEliminate2.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 9 18:51:00 PDT 2004


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

PhiEliminate2.ll added (r1.1)

---
Log message:

Simplify cfg now eliminates all of the branches in this testcase


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

Index: llvm/test/Regression/Transforms/SimplifyCFG/PhiEliminate2.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyCFG/PhiEliminate2.ll:1.1
*** /dev/null	Fri Apr  9 18:50:40 2004
--- llvm/test/Regression/Transforms/SimplifyCFG/PhiEliminate2.ll	Fri Apr  9 18:50:29 2004
***************
*** 0 ****
--- 1,15 ----
+ ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+ 
+ int %test(bool %C, int %V1, int %V2) {
+ entry:
+         br bool %C, label %then, label %Cont
+ 
+ then:
+         %V3 = or int %V2, %V1
+         br label %Cont
+ Cont:
+ 	%V4 = phi int [%V1, %entry], [%V3, %then]
+ 	call int %test(bool false, int 0, int 0)           ;; don't fold into preds
+         ret int %V1
+ }
+ 





More information about the llvm-commits mailing list