[llvm-commits] [llvm] r43398 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp test/CodeGen/PowerPC/2007-10-23-UnalignedMemcpy.ll
Bill Wendling
isanbard at gmail.com
Fri Oct 26 13:24:42 PDT 2007
Author: void
Date: Fri Oct 26 15:24:42 2007
New Revision: 43398
URL: http://llvm.org/viewvc/llvm-project?rev=43398&view=rev
Log:
- 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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/test/CodeGen/PowerPC/2007-10-23-UnalignedMemcpy.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=43398&r1=43397&r2=43398&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Oct 26 15:24:42 2007
@@ -4329,14 +4329,6 @@
}
}
- // 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 @@
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;
Modified: llvm/trunk/test/CodeGen/PowerPC/2007-10-23-UnalignedMemcpy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2007-10-23-UnalignedMemcpy.ll?rev=43398&r1=43397&r2=43398&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/2007-10-23-UnalignedMemcpy.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/2007-10-23-UnalignedMemcpy.ll Fri Oct 26 15:24:42 2007
@@ -1,4 +1,5 @@
; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin9 -o - | grep memcpy
+; XFAIL: *
@C.0.1173 = external constant [33 x i8] ; <[33 x i8]*> [#uses=1]
More information about the llvm-commits
mailing list