diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-25 14:55:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-25 14:55:30 +0000 |
commit | 4f7ae85eda4aca2eb582fcabcbbbe1c4a7e6fc9f (patch) | |
tree | f06bee5b0aead87693edd59d9a962fcabd4c4924 /test/Transforms | |
parent | f56703b608afc60430ea99ed5a688c52952d472b (diff) | |
download | external_llvm-4f7ae85eda4aca2eb582fcabcbbbe1c4a7e6fc9f.zip external_llvm-4f7ae85eda4aca2eb582fcabcbbbe1c4a7e6fc9f.tar.gz external_llvm-4f7ae85eda4aca2eb582fcabcbbbe1c4a7e6fc9f.tar.bz2 |
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll b/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll new file mode 100644 index 0000000..6114538 --- /dev/null +++ b/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll @@ -0,0 +1,19 @@ +; Promoting some values allows promotion of other values. +; RUN: if as < %s | opt -mem2reg | dis | grep alloca +; RUN: then exit 1 +; RUN: else exit 0 +; RUN: fi + +int %test2() { + %result = alloca int ; ty=int* + %a = alloca int ; ty=int* + %p = alloca int* ; ty=int** + store int 0, int* %a + store int* %a, int** %p + %tmp.0 = load int** %p ; ty=int* + %tmp.1 = load int* %tmp.0 ; ty=int + store int %tmp.1, int* %result + %tmp.2 = load int* %result ; ty=int + ret int %tmp.2 +} + |