diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-10-26 20:24:42 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-10-26 20:24:42 +0000 |
commit | 984e986929c34f9fa41ad33e3a4f19816f80c1ad (patch) | |
tree | b39c66304a248ceddcb6cf096fb620f3eaaba34f /lib | |
parent | 6a13dfdc6da8afa6eec20627e8315a9d77905d61 (diff) | |
download | external_llvm-984e986929c34f9fa41ad33e3a4f19816f80c1ad.zip external_llvm-984e986929c34f9fa41ad33e3a4f19816f80c1ad.tar.gz external_llvm-984e986929c34f9fa41ad33e3a4f19816f80c1ad.tar.bz2 |
- Remove the hacky code that forces a memcpy. Alignment is taken care of in the
FE.
- Explicitly pass in the alignment of the load & store.
- XFAIL 2007-10-23-UnalignedMemcpy.ll because llc has a bug that crashes on
unaligned pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 39aa076..b103e28 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -4329,14 +4329,6 @@ void SelectionDAGLowering::visitMemIntrinsic(CallInst &I, unsigned Op) { } } - // The lowered load/store instructions from/to the stack frame can be - // unaligned depending on whether it's accessed off sp or fp. If this is - // the case, then just use the memcpy library call. - if (Op1.getOpcode() == ISD::FrameIndex || - Op2.getOpcode() == ISD::FrameIndex) - if (Size->getValue() % Align != 0) - break; - for (unsigned i = 0; i < NumMemOps; i++) { MVT::ValueType VT = MemOps[i]; unsigned VTSize = MVT::getSizeInBits(VT) / 8; @@ -4351,13 +4343,13 @@ void SelectionDAGLowering::visitMemIntrinsic(CallInst &I, unsigned Op) { I.getOperand(1), DstOff); } else { Value = DAG.getLoad(VT, getRoot(), - getMemBasePlusOffset(Op2, SrcOff, DAG, TLI), - I.getOperand(2), SrcOff); + getMemBasePlusOffset(Op2, SrcOff, DAG, TLI), + I.getOperand(2), SrcOff, false, Align); Chain = Value.getValue(1); Store = DAG.getStore(Chain, Value, getMemBasePlusOffset(Op1, DstOff, DAG, TLI), - I.getOperand(1), DstOff); + I.getOperand(1), DstOff, false, Align); } OutChains.push_back(Store); SrcOff += VTSize; |