When allocating space on stack for writing a register,
use the size of the register, not the size of the Value type,
to get the right alignment.
llvm-svn: 1284
diff --git a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index bc82565..9133da5 100644
--- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -528,8 +528,10 @@
int SpillOff = LR->getSpillOffFromFP();
RegClass *RC = LR->getRegClass();
const LiveVarSet *LVSetBef = LVI->getLiveVarSetBeforeMInst(MInst, BB);
+
+ /**** NOTE: THIS SHOULD USE THE RIGHT SIZE FOR THE REG BEING PUSHED ****/
int TmpOff =
- mcInfo.pushTempValue(TM, TM.findOptimalStorageSize(LR->getType()));
+ mcInfo.pushTempValue(TM, 8 /* TM.findOptimalStorageSize(LR->getType()) */);
MachineInstr *MIBef=NULL, *AdIMid=NULL, *MIAft=NULL;
int TmpReg;