[mips] [IAS] Rename the createShiftOr function to createLShiftOri. NFC.
[oota-llvm.git] / lib / Target / NVPTX / NVPTXFavorNonGenericAddrSpaces.cpp
index 6d7c99c6f3ff7861513276ff6e513ffe94dcda61..ae63caec132060cd9e0f00f0568674b822b7184f 100644 (file)
@@ -132,9 +132,8 @@ bool NVPTXFavorNonGenericAddrSpaces::hoistAddrSpaceCastFromGEP(
   } else {
     // GEP is a constant expression.
     Constant *NewGEPCE = ConstantExpr::getGetElementPtr(
-        cast<Constant>(Cast->getOperand(0)),
-        Indices,
-        GEP->isInBounds());
+        GEP->getSourceElementType(), cast<Constant>(Cast->getOperand(0)),
+        Indices, GEP->isInBounds());
     GEP->replaceAllUsesWith(
         ConstantExpr::getAddrSpaceCast(NewGEPCE, GEP->getType()));
   }