diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-29 17:18:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-29 17:18:59 +0000 |
commit | b260eb82d7923693d0b778e9d4beac21b6c88748 (patch) | |
tree | a6e87370fe3d4e5c92a45777a338636e54311cb2 /test/Analysis | |
parent | c151e4f415da15d17eee60720c396e7103fcc02d (diff) | |
download | external_llvm-b260eb82d7923693d0b778e9d4beac21b6c88748.zip external_llvm-b260eb82d7923693d0b778e9d4beac21b6c88748.tar.gz external_llvm-b260eb82d7923693d0b778e9d4beac21b6c88748.tar.bz2 |
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll b/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll new file mode 100644 index 0000000..be9ee2c --- /dev/null +++ b/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll @@ -0,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 +} |