From 9958b8273368e3cab28dd79d6faec0c5478f2ec3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 5 May 2007 22:44:08 +0000 Subject: [PATCH] add a note llvm-svn: 36811 --- llvm/lib/Target/README.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt index 20f4898b2a43..37b671f34b76 100644 --- a/llvm/lib/Target/README.txt +++ b/llvm/lib/Target/README.txt @@ -424,3 +424,28 @@ return: [ %tmp.9, %then.1 ] ret int %result.0 } + +//===---------------------------------------------------------------------===// + +Argument promotion should promote arguments for recursive functions, like +this: + +; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | grep x.val + +implementation ; Functions: + +internal int %foo(int* %x) { +entry: + %tmp = load int* %x + %tmp.foo = call int %foo(int *%x) + ret int %tmp.foo +} + +int %bar(int* %x) { +entry: + %tmp3 = call int %foo( int* %x) ; [#uses=1] + ret int %tmp3 +} + + +