diff options
Diffstat (limited to 'test/Analysis/BasicAA/2003-04-22-GEPProblem.ll')
-rw-r--r-- | test/Analysis/BasicAA/2003-04-22-GEPProblem.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll b/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll new file mode 100644 index 0000000..ddadc8e --- /dev/null +++ b/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll @@ -0,0 +1,15 @@ +; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep sub + +; BasicAA was incorrectly concluding that P1 and P2 didn't conflict! + +int %test(int *%Ptr, long %V) { + %P2 = getelementptr int* %Ptr, long 1 + %P1 = getelementptr int* %Ptr, long %V + %X = load int* %P1 + store int 5, int* %P2 + + %Y = load int* %P1 + + %Z = sub int %X, %Y + ret int %Z +} |