[llvm-commits] CVS: llvm/test/Regression/Transforms/LICM/sink_multiple_exits.ll

Chris Lattner lattner at cs.uiuc.edu
Tue Dec 9 15:41:03 PST 2003


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

sink_multiple_exits.ll added (r1.1)

---
Log message:

New testcase for sinking operations from loops with multiple exits


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

Index: llvm/test/Regression/Transforms/LICM/sink_multiple_exits.ll
diff -c /dev/null llvm/test/Regression/Transforms/LICM/sink_multiple_exits.ll:1.1
*** /dev/null	Tue Dec  9 15:40:46 2003
--- llvm/test/Regression/Transforms/LICM/sink_multiple_exits.ll	Tue Dec  9 15:40:36 2003
***************
*** 0 ****
--- 1,22 ----
+ ; This testcase ensures that we can sink instructions from loops with
+ ; multiple exits.
+ ;
+ ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 mul | grep Out: 
+ 
+ int %test(int %N, bool %C) {
+ Entry:
+ 	br label %Loop
+ Loop:
+         %N_addr.0.pn = phi int [ %dec, %ContLoop ], [ %N, %Entry ]
+         %tmp.6 = mul int %N, %N_addr.0.pn
+         %tmp.7 = sub int %tmp.6, %N
+         %dec = add int %N_addr.0.pn, -1
+         br bool %C, label %ContLoop, label %Out1
+ ContLoop:
+         %tmp.1 = setne int %N_addr.0.pn, 1
+         br bool %tmp.1, label %Loop, label %Out2
+ Out1:
+ 	ret int %tmp.7
+ Out2:
+         ret int %tmp.7
+ }





More information about the llvm-commits mailing list