diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-08-15 23:41:42 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-08-15 23:41:42 +0000 |
commit | badf17cdc7faa4717215a3a2f68bd75a28bfefec (patch) | |
tree | bfc0860a396632068bc69abcd730060e5a3202f7 /llvm/lib/CodeGen | |
parent | f86a8d10307db47974c41b71ffcd90a00cc93f24 (diff) | |
download | bcm5719-llvm-badf17cdc7faa4717215a3a2f68bd75a28bfefec.tar.gz bcm5719-llvm-badf17cdc7faa4717215a3a2f68bd75a28bfefec.zip |
Needs to check whether unaligned load / store of i64 is legal here.
llvm-svn: 79150
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index fa99aaabf27..75de2035796 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3108,9 +3108,8 @@ bool MeetsMaxMemopRequirement(std::vector<EVT> &MemOps, EVT VT = TLI.getOptimalMemOpType(Size, Align, isSrcConst, isSrcStr, DAG); bool AllowUnalign = TLI.allowsUnalignedMemoryAccesses(VT); if (VT != MVT::iAny) { - unsigned NewAlign = (unsigned) - TLI.getTargetData()->getABITypeAlignment( - VT.getTypeForEVT(*DAG.getContext())); + const Type *Ty = VT.getTypeForEVT(*DAG.getContext()); + unsigned NewAlign = (unsigned) TLI.getTargetData()->getABITypeAlignment(Ty); // If source is a string constant, this will require an unaligned load. if (NewAlign > Align && (isSrcConst || AllowUnalign)) { if (Dst.getOpcode() != ISD::FrameIndex) { @@ -3135,7 +3134,7 @@ bool MeetsMaxMemopRequirement(std::vector<EVT> &MemOps, } if (VT == MVT::iAny) { - if (AllowUnalign) { + if (TLI.allowsUnalignedMemoryAccesses(MVT::i64)) { VT = MVT::i64; } else { switch (Align & 7) { |