diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-24 17:57:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-24 17:57:43 +0000 |
commit | 4e59c642c84423d3509b490851506554e11ee999 (patch) | |
tree | 3137ee25de6ddeb5640b7a41d070e7933d9b1931 /test | |
parent | 1bcb9abb30b81aa6987de5107ff366a3aa33ae8d (diff) | |
download | external_llvm-4e59c642c84423d3509b490851506554e11ee999.zip external_llvm-4e59c642c84423d3509b490851506554e11ee999.tar.gz external_llvm-4e59c642c84423d3509b490851506554e11ee999.tar.bz2 |
new testcase that DS-AA is causing to be miscompiled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll b/test/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll new file mode 100644 index 0000000..2293388 --- /dev/null +++ b/test/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll @@ -0,0 +1,26 @@ +; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int* %L' + +%G = internal global int* null + +int %caller(bool %P) { + %L = alloca int + call void %callee(bool %P, int* %L) + + ;; At this point, G could point to L, so we can't eliminate these operations. + %GP = load int** %G + store int 17, int* %L + store int 18, int* %GP ;; might clober L + + %A = load int* %L ;; is not necessarily 17! + ret int %A +} + +internal void %callee(bool %Cond, int* %P) { + br bool %Cond, label %T, label %F +T: + store int* %P, int** %G + ret void +F: + ret void +} + |