Fix an obvious copy-n-paste bug. It's not known to cause any miscompilation.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 5 Apr 2010 23:33:29 +0000 (23:33 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 5 Apr 2010 23:33:29 +0000 (23:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100494 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 4570c4d8cf1b91b9c40fc916e90e058ade68059d..8c0554d186d928dbac5a483bafbd646d2cebcf7e 100644 (file)
@@ -3206,11 +3206,9 @@ static bool FindOptimalMemOpLowering(std::vector<EVT> &MemOps,
                                    NonScalarIntSafe, DAG);
 
   if (VT == MVT::Other) {
-    VT = TLI.getPointerTy();
-    const Type *Ty = VT.getTypeForEVT(*DAG.getContext());
-    if (DstAlign >= TLI.getTargetData()->getABITypeAlignment(Ty) ||
+    if (DstAlign >= TLI.getTargetData()->getPointerPrefAlignment() ||
         TLI.allowsUnalignedMemoryAccesses(VT)) {
-      VT = MVT::i64;
+      VT = TLI.getPointerTy();
     } else {
       switch (DstAlign & 7) {
       case 0:  VT = MVT::i64; break;