[llvm-commits] CVS: llvm/test/Regression/Transforms/GCSE/undefined_load.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 2 23:36:40 PST 2004


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

undefined_load.ll added (r1.1)

---
Log message:

New testcase


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

Index: llvm/test/Regression/Transforms/GCSE/undefined_load.ll
diff -c /dev/null llvm/test/Regression/Transforms/GCSE/undefined_load.ll:1.1
*** /dev/null	Fri Apr  2 18:45:06 2004
--- llvm/test/Regression/Transforms/GCSE/undefined_load.ll	Fri Apr  2 18:44:56 2004
***************
*** 0 ****
--- 1,14 ----
+ ; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
+ ; Test that loads of undefined memory are eliminated.
+ 
+ int %test1() {
+ 	%X = malloc int
+ 	%Y = load int* %X
+ 	ret int %Y
+ }
+ int %test2() {
+ 	%X = alloca int
+ 	%Y = load int* %X
+ 	ret int %Y
+ }
+ 





More information about the llvm-commits mailing list