diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-13 23:30:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-13 23:30:22 +0000 |
commit | 32e7a80cdb915c762ff9634f5712b00b44feeb1e (patch) | |
tree | b50bcc2aa1ff1648905475ac0f05565d1c10098c /test/Transforms/ArgumentPromotion/control-flow2.ll | |
parent | 78d223e1fb7cc0e5240c40416bd456dcfa776afa (diff) | |
download | external_llvm-32e7a80cdb915c762ff9634f5712b00b44feeb1e.zip external_llvm-32e7a80cdb915c762ff9634f5712b00b44feeb1e.tar.gz external_llvm-32e7a80cdb915c762ff9634f5712b00b44feeb1e.tar.bz2 |
Add a testcase we should continue to argpromote
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ArgumentPromotion/control-flow2.ll')
-rw-r--r-- | test/Transforms/ArgumentPromotion/control-flow2.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/ArgumentPromotion/control-flow2.ll b/test/Transforms/ArgumentPromotion/control-flow2.ll new file mode 100644 index 0000000..d68d207 --- /dev/null +++ b/test/Transforms/ArgumentPromotion/control-flow2.ll @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | grep 'load int\* %A' + +implementation + +internal int %callee(bool %C, int* %P) { + br bool %C, label %T, label %F +T: + ret int 17 +F: + %X = load int* %P + ret int %X +} + +int %foo() { + %A = alloca int + store int 17, int* %A + %X = call int %callee(bool false, int* %A) + ret int %X +} + |