diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-11 19:55:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-11 19:55:07 +0000 |
commit | 602dfea79c7f3acec9204315b31726f7f037d4b9 (patch) | |
tree | 9783eb331b3a2de513e3b4adbeee2095bf791ed6 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
parent | eaf94a8d2ed7a1a7735ff5097874f7fe40a7c330 (diff) | |
download | bcm5719-llvm-602dfea79c7f3acec9204315b31726f7f037d4b9.tar.gz bcm5719-llvm-602dfea79c7f3acec9204315b31726f7f037d4b9.zip |
Fix calls that need to store values in stack slots, to not copy the stack
pointer. This allows us to emit stuff like this:
li r10, 0
stw r10, 56(r1)
or r3, r10, r10
or r4, r10, r10
or r5, r10, r10
or r6, r10, r10
or r7, r10, r10
or r8, r10, r10
or r9, r10, r10
bl L_bar$stub
instead of this:
or r2, r1, r1 ;; Extraneous copy.
li r10, 0
stw r10, 56(r2)
or r3, r10, r10
or r4, r10, r10
or r5, r10, r10
or r6, r10, r10
or r7, r10, r10
or r8, r10, r10
or r9, r10, r10
bl L_bar$stub
wowness.
llvm-svn: 25221
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 976f80fafa9..9674432deef 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -657,8 +657,7 @@ PPCTargetLowering::LowerCallTo(SDOperand Chain, // Set up a copy of the stack pointer for use loading and storing any // arguments that may not fit in the registers available for argument // passing. - SDOperand StackPtr = DAG.getCopyFromReg(DAG.getEntryNode(), - PPC::R1, MVT::i32); + SDOperand StackPtr = DAG.getRegister(PPC::R1, MVT::i32); // Figure out which arguments are going to go in registers, and which in // memory. Also, if this is a vararg function, floating point operations |