blob: 9f01d24806da534257ed65690994cfd31bf18be8 [file] [log] [blame]
Chris Lattnerdb033fa2004-04-03 00:44:56 +00001; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
2; Test that loads of undefined memory are eliminated.
3
4int %test1() {
5 %X = malloc int
6 %Y = load int* %X
7 ret int %Y
8}
9int %test2() {
10 %X = alloca int
11 %Y = load int* %X
12 ret int %Y
13}
14