Hi Bill, This disables too much. Even as a first step you should only disable this when it may be possible to generate a unaligned load / store. Also please add comments to describe what can go wrong when the destination is a stack object.
Also, is it possible the same issue can arise when the source is a frameindex? Evan On Oct 23, 2007, at 2:30 PM, Bill Wendling wrote: > Author: void > Date: Tue Oct 23 16:30:25 2007 > New Revision: 43262 > > URL: http://llvm.org/viewvc/llvm-project?rev=43262&view=rev > Log: > 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. > > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=43262&r1=43261&r2=43262&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct > 23 16:30:25 2007 > @@ -4302,6 +4302,10 @@ > 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(); > > > _______________________________________________ > llvm-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
