summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CellSPU
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-13 07:35:30 +0000
committerChris Lattner <sabre@nondot.org>2008-02-13 07:35:30 +0000
commitf6518cf4aba9710c5949c7f2d477bf55ea71fe16 (patch)
treec4e52fd3d49cd537e9f9d302c6a6de488cec6d40 /llvm/lib/Target/CellSPU
parentee322b44a4a583abe4c00a058ad70b390163be10 (diff)
downloadbcm5719-llvm-f6518cf4aba9710c5949c7f2d477bf55ea71fe16.tar.gz
bcm5719-llvm-f6518cf4aba9710c5949c7f2d477bf55ea71fe16.zip
don't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
DAGCombine is now quite good at zapifying them. llvm-svn: 47053
Diffstat (limited to 'llvm/lib/Target/CellSPU')
-rw-r--r--llvm/lib/Target/CellSPU/SPUISelLowering.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
index e060b36b899..6fe6e48bc84 100644
--- a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
+++ b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
@@ -1008,17 +1008,9 @@ LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG, int &VarArgsFrameIndex)
// We need to load the argument to a virtual register if we determined above
// that we ran out of physical registers of the appropriate type
if (needsLoad) {
- // If the argument is actually used, emit a load from the right stack
- // slot.
- if (!Op.Val->hasNUsesOfValue(0, ArgNo)) {
- int FI = MFI->CreateFixedObject(ObjSize, ArgOffset);
- SDOperand FIN = DAG.getFrameIndex(FI, PtrVT);
- ArgVal = DAG.getLoad(ObjectVT, Root, FIN, NULL, 0);
- } else {
- // Don't emit a dead load.
- ArgVal = DAG.getNode(ISD::UNDEF, ObjectVT);
- }
-
+ int FI = MFI->CreateFixedObject(ObjSize, ArgOffset);
+ SDOperand FIN = DAG.getFrameIndex(FI, PtrVT);
+ ArgVal = DAG.getLoad(ObjectVT, Root, FIN, NULL, 0);
ArgOffset += StackSlotSize;
}
OpenPOWER on IntegriCloud