diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-11 19:16:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-11 19:16:30 +0000 |
commit | 52112965801b0052463aa51e501df84d012f85dd (patch) | |
tree | c8a65c273d7637d1ba91e52fb46c72423009b0b4 | |
parent | ca6cc6f277390d91c1f24833ea9a6ba89ac09f3d (diff) |
New testcase for PR86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10403 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll | 17 | ||||
-rw-r--r-- | test/Transforms/BasicAA/2003-12-11-ConstExprGEP.ll | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll new file mode 100644 index 0000000000..bc118a38e9 --- /dev/null +++ b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll @@ -0,0 +1,17 @@ +; This testcase consists of alias relations which should be completely +; resolvable by basicaa, but require analysis of getelementptr constant exprs. + +; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May: + +%T = type { uint, [10 x ubyte] } + +%G = external global %T + +void %test() { + %D = getelementptr %T* %G, long 0, ubyte 0 + %E = getelementptr %T* %G, long 0, ubyte 1, long 5 + %F = getelementptr uint* getelementptr (%T* %G, long 0, ubyte 0), long 0 + %G = getelementptr [10 x ubyte]* getelementptr (%T* %G, long 0, ubyte 1), long 0, long 5 + + ret void +} diff --git a/test/Transforms/BasicAA/2003-12-11-ConstExprGEP.ll b/test/Transforms/BasicAA/2003-12-11-ConstExprGEP.ll new file mode 100644 index 0000000000..bc118a38e9 --- /dev/null +++ b/test/Transforms/BasicAA/2003-12-11-ConstExprGEP.ll @@ -0,0 +1,17 @@ +; This testcase consists of alias relations which should be completely +; resolvable by basicaa, but require analysis of getelementptr constant exprs. + +; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May: + +%T = type { uint, [10 x ubyte] } + +%G = external global %T + +void %test() { + %D = getelementptr %T* %G, long 0, ubyte 0 + %E = getelementptr %T* %G, long 0, ubyte 1, long 5 + %F = getelementptr uint* getelementptr (%T* %G, long 0, ubyte 0), long 0 + %G = getelementptr [10 x ubyte]* getelementptr (%T* %G, long 0, ubyte 1), long 0, long 5 + + ret void +} |