[llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/field-sensitive.ll

Chris Lattner lattner at cs.uiuc.edu
Tue Mar 22 17:47:12 PST 2005



Changes in directory llvm/test/Regression/Analysis/DSGraph:

field-sensitive.ll added (r1.1)
---
Log message:

new testcase to verify that we have field sensitive alias analysis info.  This
test cannot be satisfied without interprocedural information.


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

 field-sensitive.ll |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+)


Index: llvm/test/Regression/Analysis/DSGraph/field-sensitive.ll
diff -c /dev/null llvm/test/Regression/Analysis/DSGraph/field-sensitive.ll:1.1
*** /dev/null	Tue Mar 22 19:47:10 2005
--- llvm/test/Regression/Analysis/DSGraph/field-sensitive.ll	Tue Mar 22 19:46:59 2005
***************
*** 0 ****
--- 1,21 ----
+ ; Test that ds-aa can be used for queries that require field sensitive AA.
+ ; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
+ 
+ %Pair = type { int, int }
+ 
+ implementation
+ 
+ %Pair* %id(%Pair* %P) { ret %Pair *%P }
+ 
+ int %foo() {
+ 	%X = alloca %Pair
+ 	%XP = call %Pair* %id(%Pair* %X)
+ 
+ 	%F1 = getelementptr %Pair* %X, int 0, uint 0
+ 	%F2 = getelementptr %Pair* %XP, int 0, uint 1
+ 	store int 14, int* %F1
+ 	store int 0, int* %F2     ; no alias F1
+ 	%B = load int* %F1        ; Should eliminate load!
+ 	ret int %B
+ }
+ 






More information about the llvm-commits mailing list