From da10e3350a6a63d5008f09cc4bf7d8e3ccbd6d60 Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Fri, 23 Feb 2007 22:12:08 +0000 Subject: [PATCH] New test - practically wrote itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34538 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll diff --git a/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll b/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll new file mode 100644 index 00000000000..2e67f8f0d25 --- /dev/null +++ b/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc | grep mflr | wc -l | grep 1 + +target datalayout = "e-p:32:32" +target triple = "powerpc-apple-darwin8" +@str = internal constant [18 x i8] c"hello world!, %d\0A\00" ; <[18 x i8]*> [#uses=1] + +implementation ; Functions: + +define i32 @main() { +entry: + %tmp = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([18 x i8]* @str, i32 0, i32 0) ) ; [#uses=0] + ret i32 0 +} + +declare i32 @printf(i8*, ...) -- 2.34.1