From: Chris Lattner Date: Sat, 13 Nov 2004 23:28:39 +0000 (+0000) Subject: Add a testcase for a function we cannot legally promote the argument of. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=78d223e1fb7cc0e5240c40416bd456dcfa776afa;p=oota-llvm.git Add a testcase for a function we cannot legally promote the argument of. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17716 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/ArgumentPromotion/control-flow.ll b/test/Transforms/ArgumentPromotion/control-flow.ll new file mode 100644 index 00000000000..3907ed0f78c --- /dev/null +++ b/test/Transforms/ArgumentPromotion/control-flow.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | not grep 'load int\* null' + +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() { + %X = call int %callee(bool true, int* null) + ret int %X +} +