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

Chris Lattner lattner at cs.uiuc.edu
Tue Dec 9 23:43:00 PST 2003


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

sink_only_some_exits.ll added (r1.1)

---
Log message:

new testcase, checking to ensure we handle yet-another spiffy case correctly


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

Index: llvm/test/Regression/Transforms/LICM/sink_only_some_exits.ll
diff -c /dev/null llvm/test/Regression/Transforms/LICM/sink_only_some_exits.ll:1.1
*** /dev/null	Tue Dec  9 23:42:33 2003
--- llvm/test/Regression/Transforms/LICM/sink_only_some_exits.ll	Tue Dec  9 23:42:23 2003
***************
*** 0 ****
--- 1,25 ----
+ ; This testcase checks to make sure we can sink values which are only live on
+ ; some exits out of the loop, and that we can do so without breaking dominator
+ ; info.
+ ;
+ ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 add | grep exit2:
+ 
+ implementation   ; Functions:
+ 
+ int %test(bool %C1, bool %C2, int *%P, int* %Q) {
+ Entry:
+ 	br label %Loop
+ 
+ Loop:
+ 	br bool %C1, label %Cont, label %exit1
+ Cont:
+ 	%X = load int* %P
+ 	store int %X, int* %Q
+  	%V = add int %X, 1
+ 	br bool %C2, label %Loop, label %exit2
+ 
+ exit1:
+ 	ret int 0
+ exit2:
+ 	ret int %V
+ }





More information about the llvm-commits mailing list