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

Chris Lattner lattner at cs.uiuc.edu
Sat Jun 28 16:55:01 PDT 2003


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

buglobals.ll added (r1.1)

---
Log message:

New testcase


---
Diffs of the changes:

Index: llvm/test/Regression/Analysis/DSGraph/buglobals.ll
diff -c /dev/null llvm/test/Regression/Analysis/DSGraph/buglobals.ll:1.1
*** /dev/null	Sat Jun 28 16:54:35 2003
--- llvm/test/Regression/Analysis/DSGraph/buglobals.ll	Sat Jun 28 16:54:24 2003
***************
*** 0 ****
--- 1,21 ----
+ ; This tests to make sure that G ends up in the globals graph of the BU pass.
+ ; If it is not, then %G will get converted to a 'constant' from a 'global'
+ ;
+ ; RUN: as < %s | opt -ds-opt -globaldce | dis | grep %G
+ 
+ 
+ %G = internal global int 0		; <int*> [#uses=2]
+ 
+ implementation   ; Functions:
+ 
+ internal void %foo() {
+ 	%tmp.0 = load int* %G		; <int> [#uses=1]
+ 	%tmp.1 = add int %tmp.0, 1		; <int> [#uses=1]
+ 	store int %tmp.1, int* %G
+ 	ret void
+ }
+ 
+ int %main() {
+ 	call void %foo( )
+ 	ret int 0
+ }





More information about the llvm-commits mailing list