[llvm-commits] CVS: llvm/test/Regression/Transforms/ArgumentPromotion/aggregate-promote.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Mar 7 18:59:01 PST 2004


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

aggregate-promote.ll added (r1.1)

---
Log message:

New testcase


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

Index: llvm/test/Regression/Transforms/ArgumentPromotion/aggregate-promote.ll
diff -c /dev/null llvm/test/Regression/Transforms/ArgumentPromotion/aggregate-promote.ll:1.1
*** /dev/null	Sun Mar  7 18:58:29 2004
--- llvm/test/Regression/Transforms/ArgumentPromotion/aggregate-promote.ll	Sun Mar  7 18:58:19 2004
***************
*** 0 ****
--- 1,21 ----
+ ; RUN: llvm-as < %s | opt -argpromotion -instcombine | not grep load
+ 
+ %QuadTy = type {int, int, int, int}
+ 
+ %G = constant %QuadTy {int 0, int 0, int 17, int 25 }
+ 
+ implementation
+ 
+ internal int %test(%QuadTy* %P) {
+ 	%A = getelementptr %QuadTy* %P, long 0, ubyte 3
+ 	%B = getelementptr %QuadTy* %P, long 0, ubyte 2
+ 	%a = load int* %A
+ 	%b = load int* %B
+ 	%V = add int %a, %b
+ 	ret int %V
+ }
+ 
+ int %caller() {
+ 	%V = call int %test(%QuadTy* %G)
+ 	ret int %V
+ }





More information about the llvm-commits mailing list