Re-instate the EVT parameter to getScalarShiftAmountTy() for OOT user
[oota-llvm.git] / lib / CodeGen / SelectionDAG / DAGCombiner.cpp
index 06e5cfcb4b1b9e8bd421fc8fb50b96941908a9c3..86b73d35806e287984ac2b5e5b7842025067993f 100644 (file)
@@ -444,7 +444,7 @@ namespace {
       if (LHSTy.isVector())
         return LHSTy;
       auto &DL = DAG.getDataLayout();
-      return LegalTypes ? TLI.getScalarShiftAmountTy(LHSTy)
+      return LegalTypes ? TLI.getScalarShiftAmountTy(DL, LHSTy)
                         : TLI.getPointerTy(DL);
     }
 
@@ -9144,7 +9144,8 @@ static bool canFoldInAddressingMode(SDNode *N, SDNode *Use,
   } else
     return false;
 
-  return TLI.isLegalAddressingMode(AM, VT.getTypeForEVT(*DAG.getContext()), AS);
+  return TLI.isLegalAddressingMode(DAG.getDataLayout(), AM,
+                                   VT.getTypeForEVT(*DAG.getContext()), AS);
 }
 
 /// Try turning a load/store into a pre-indexed load/store when the base