add a note
authorChris Lattner <sabre@nondot.org>
Sat, 5 May 2007 22:44:08 +0000 (22:44 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 5 May 2007 22:44:08 +0000 (22:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36811 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 20f4898b2a4378dde9ccff7dafcd9de1bccc86ef..37b671f34b7638eb1db8e0fe532be03517a4a01f 100644 (file)
@@ -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)                ; <int>[#uses=1]
+        ret int %tmp3
+}
+
+
+