[llvm-commits] CVS: llvm/test/Regression/Transforms/ArgumentPromotion/control-flow.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Nov 13 15:28:51 PST 2004



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

control-flow.ll added (r1.1)
---
Log message:

Add a testcase for a function we cannot legally promote the argument of.


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

Index: llvm/test/Regression/Transforms/ArgumentPromotion/control-flow.ll
diff -c /dev/null llvm/test/Regression/Transforms/ArgumentPromotion/control-flow.ll:1.1
*** /dev/null	Sat Nov 13 17:28:49 2004
--- llvm/test/Regression/Transforms/ArgumentPromotion/control-flow.ll	Sat Nov 13 17:28:39 2004
***************
*** 0 ****
--- 1,18 ----
+ ; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | not grep 'load int\* null'
+ 
+ implementation
+ 
+ internal int %callee(bool %C, int* %P) {
+ 	br bool %C, label %T, label %F
+ T:
+ 	ret int 17
+ F:
+ 	%X = load int* %P
+ 	ret int %X
+ }
+ 
+ int %foo() {
+ 	%X = call int %callee(bool true, int* null)
+ 	ret int %X
+ }
+ 






More information about the llvm-commits mailing list