[llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Jun 29 12:20:01 PDT 2003


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

2003-06-29-NodeCollapsing.ll added (r1.1)

---
Log message:

New testcase


---
Diffs of the changes:

Index: llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll
diff -c /dev/null llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll:1.1
*** /dev/null	Sun Jun 29 12:19:09 2003
--- llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll	Sun Jun 29 12:18:59 2003
***************
*** 0 ****
--- 1,24 ----
+ ; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse | dis | not grep load
+ %T = type { int*, int* }
+ 
+ int %main() {
+ 	%A = alloca %T
+ 	%B = alloca { %T }
+ 	%C = alloca %T*
+ 	%Bp = getelementptr { %T }* %B, long 0, ubyte 0
+ 
+ 	%i0 = alloca int
+ 	%i1 = alloca int
+ 	%Ap0 = getelementptr %T* %A, long 0, ubyte 0
+ 	%Ap1 = getelementptr %T* %A, long 0, ubyte 1
+ 	store int* %i0, int** %Ap0
+ 	store int* %i1, int** %Ap1
+ 
+ 	store int 0, int* %i0
+ 	store int 1, int* %i1
+ 	%RetVal = load int* %i0   ; This load should be deletable
+ 
+ 	store %T* %A, %T** %C
+ 	store %T* %Bp, %T** %C    ; This store was causing merging to happen!
+ 	ret int %RetVal
+ }





More information about the llvm-commits mailing list