blob: c701fef8e629be573cb05a369edbd08351c78548 [file] [log] [blame]
Tim Northover501977e2013-08-12 12:43:26 +00001; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
2; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC64
3; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-NOFP
4; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC64-NOFP
5; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
6; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32-RS
7; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-RS-NOFP
Daniel Dunbar6969df02009-08-24 20:08:27 +00008
Dale Johannesen5ece8f02009-11-24 22:59:02 +00009; CHECK-PPC32: stw r31, -4(r1)
Daniel Dunbar6969df02009-08-24 20:08:27 +000010; CHECK-PPC32: lwz r1, 0(r1)
Dale Johannesen5ece8f02009-11-24 22:59:02 +000011; CHECK-PPC32: lwz r31, -4(r1)
12; CHECK-PPC32-NOFP: stw r31, -4(r1)
Daniel Dunbar6969df02009-08-24 20:08:27 +000013; CHECK-PPC32-NOFP: lwz r1, 0(r1)
Dale Johannesen5ece8f02009-11-24 22:59:02 +000014; CHECK-PPC32-NOFP: lwz r31, -4(r1)
Ulrich Weigandf316e1d2014-06-23 13:47:52 +000015; CHECK-PPC32-RS: stwu r1, -48(r1)
16; CHECK-PPC32-RS-NOFP: stwu r1, -48(r1)
Daniel Dunbar6969df02009-08-24 20:08:27 +000017
Dale Johannesen5ece8f02009-11-24 22:59:02 +000018; CHECK-PPC64: std r31, -8(r1)
Ulrich Weigandf316e1d2014-06-23 13:47:52 +000019; CHECK-PPC64: stdu r1, -64(r1)
Daniel Dunbar6969df02009-08-24 20:08:27 +000020; CHECK-PPC64: ld r1, 0(r1)
Dale Johannesen5ece8f02009-11-24 22:59:02 +000021; CHECK-PPC64: ld r31, -8(r1)
22; CHECK-PPC64-NOFP: std r31, -8(r1)
Ulrich Weigandf316e1d2014-06-23 13:47:52 +000023; CHECK-PPC64-NOFP: stdu r1, -64(r1)
Daniel Dunbar6969df02009-08-24 20:08:27 +000024; CHECK-PPC64-NOFP: ld r1, 0(r1)
Dale Johannesen5ece8f02009-11-24 22:59:02 +000025; CHECK-PPC64-NOFP: ld r31, -8(r1)
Jim Laskey6684f2f2006-11-17 16:54:21 +000026
Chris Lattner745219e2010-02-21 20:33:20 +000027define i32* @f1(i32 %n) nounwind {
Bill Wendling30075852008-02-26 23:22:40 +000028 %tmp = alloca i32, i32 %n ; <i32*> [#uses=1]
29 ret i32* %tmp
Jim Laskey6684f2f2006-11-17 16:54:21 +000030}