From 32e7a80cdb915c762ff9634f5712b00b44feeb1e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 13 Nov 2004 23:30:22 +0000 Subject: [PATCH] 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 --- .../ArgumentPromotion/control-flow2.ll | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/Transforms/ArgumentPromotion/control-flow2.ll diff --git a/test/Transforms/ArgumentPromotion/control-flow2.ll b/test/Transforms/ArgumentPromotion/control-flow2.ll new file mode 100644 index 00000000000..d68d207725e --- /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 +} +