[llvm-branch-commits] [llvm-branch] r79151 - /llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Bill Wendling isanbard at gmail.com
Sat Aug 15 17:10:08 PDT 2009


Author: void
Date: Sat Aug 15 19:10:08 2009
New Revision: 79151

URL: http://llvm.org/viewvc/llvm-project?rev=79151&view=rev
Log:
$ svn merge -c 79150 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r79150 into '.':
U    lib/CodeGen/SelectionDAG/SelectionDAG.cpp



Modified:
    llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=79151&r1=79150&r2=79151&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Aug 15 19:10:08 2009
@@ -3108,9 +3108,8 @@
   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 @@
   }
 
   if (VT == MVT::iAny) {
-    if (AllowUnalign) {
+    if (TLI.allowsUnalignedMemoryAccesses(MVT::i64)) {
       VT = MVT::i64;
     } else {
       switch (Align & 7) {





More information about the llvm-branch-commits mailing list