diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-08 19:59:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-08 19:59:22 +0000 |
commit | 86371b70f657b75d4d7cef8f8c61046f92a4d3fd (patch) | |
tree | e9090ba7767617bdd253be29c07085481ccfa99c /test/Transforms | |
parent | 92eaec932c2962b1c46db7c2b38e8e7cc0ef7bea (diff) | |
download | external_llvm-86371b70f657b75d4d7cef8f8c61046f92a4d3fd.zip external_llvm-86371b70f657b75d4d7cef8f8c61046f92a4d3fd.tar.gz external_llvm-86371b70f657b75d4d7cef8f8c61046f92a4d3fd.tar.bz2 |
New testcase, corresponding to phi_promote.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/ScalarRepl/select_promote.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/select_promote.ll b/test/Transforms/ScalarRepl/select_promote.ll new file mode 100644 index 0000000..18b55a8 --- /dev/null +++ b/test/Transforms/ScalarRepl/select_promote.ll @@ -0,0 +1,17 @@ +; Test promotion of loads that use the result of a select instruction. + +; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep alloca + +int %main() { + %mem_tmp.0 = alloca int ; <int*> [#uses=3] + %mem_tmp.1 = alloca int ; <int*> [#uses=3] + store int 0, int* %mem_tmp.0 + store int 1, int* %mem_tmp.1 + %tmp.1.i = load int* %mem_tmp.1 ; <int> [#uses=1] + %tmp.3.i = load int* %mem_tmp.0 ; <int> [#uses=1] + %tmp.4.i = setle int %tmp.1.i, %tmp.3.i ; <bool> [#uses=1] + %mem_tmp.i.0 = select bool %tmp.4.i, int* %mem_tmp.1, int* %mem_tmp.0 ; <int*> [#uses=1] + %tmp.3 = load int* %mem_tmp.i.0 ; <int> [#uses=1] + ret int %tmp.3 +} + |