diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-10-19 00:16:32 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-10-19 00:16:32 +0000 |
commit | 3454ed9545d10064d84e45ad9a9ea26dddc255ba (patch) | |
tree | 4120f9fd7218b496e775a61529a5e3c053c7a2a5 /lib | |
parent | 87f4a1a4331e40cbba28e829561759d146273840 (diff) | |
download | external_llvm-3454ed9545d10064d84e45ad9a9ea26dddc255ba.zip external_llvm-3454ed9545d10064d84e45ad9a9ea26dddc255ba.tar.gz external_llvm-3454ed9545d10064d84e45ad9a9ea26dddc255ba.tar.bz2 |
Support alignment for NEON vld-lane and vst-lane instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/ARMISelDAGToDAG.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp index 4485da4..aa65a48 100644 --- a/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -1298,6 +1298,17 @@ SDNode *ARMDAGToDAGISel::SelectVLDSTLane(SDNode *N, bool IsLoad, EVT VT = IsLoad ? N->getValueType(0) : N->getOperand(3).getValueType(); bool is64BitVector = VT.is64BitVector(); + if (NumVecs != 3) { + unsigned Alignment = cast<MemIntrinsicSDNode>(N)->getAlignment(); + unsigned NumBytes = NumVecs * VT.getVectorElementType().getSizeInBits()/8; + if (Alignment > NumBytes) + Alignment = NumBytes; + // Alignment must be a power of two; make sure of that. + Alignment = (Alignment & -Alignment); + if (Alignment > 1) + Align = CurDAG->getTargetConstant(Alignment, MVT::i32); + } + unsigned OpcodeIndex; switch (VT.getSimpleVT().SimpleTy) { default: llvm_unreachable("unhandled vld/vst lane type"); |