From 8971440e56b7dcb77db4cdf3f8b55489975958c4 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 23 Oct 2007 21:30:25 +0000 Subject: [PATCH] Lowering a memcpy to the stack is killing PPC. The ARM and X86 backends already have their own custom memcpy lowering code. This code needs to be factored out into a target-independent lowering method with hooks to the backend. In the meantime, just call memcpy if we're trying to copy onto a stack. llvm-svn: 43262 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 610c898d1705..4468d16e8c27 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -4302,6 +4302,10 @@ void SelectionDAGLowering::visitMemIntrinsic(CallInst &I, unsigned Op) { break; } case ISD::MEMCPY: { + // FIXME: Disabling memcpy lowering for copying onto the stack. + if (Op1.getOpcode() == ISD::FrameIndex) + break; + if (MeetsMaxMemopRequirement(MemOps, TLI.getMaxStoresPerMemcpy(), Size->getValue(), Align, TLI)) { unsigned NumMemOps = MemOps.size();