llvm.org GIT mirror llvm / 63a6e77
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5857 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
2 changed file(s) with 30 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep sub
1
2 ; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
3
4 int %test(int *%Ptr, long %V) {
5 %P2 = getelementptr int* %Ptr, long 1
6 %P1 = getelementptr int* %Ptr, long %V
7 %X = load int* %P1
8 store int 5, int* %P2
9
10 %Y = load int* %P1
11
12 %Z = sub int %X, %Y
13 ret int %Z
14 }
0 ; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep sub
1
2 ; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
3
4 int %test(int *%Ptr, long %V) {
5 %P2 = getelementptr int* %Ptr, long 1
6 %P1 = getelementptr int* %Ptr, long %V
7 %X = load int* %P1
8 store int 5, int* %P2
9
10 %Y = load int* %P1
11
12 %Z = sub int %X, %Y
13 ret int %Z
14 }