[opaque pointer type] More GEP IRBuilder API migrations...

llvm-svn: 234058
diff --git a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
index 3c1916f..d2eb0e9 100644
--- a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
@@ -480,7 +480,8 @@
         Type *CharTy = Type::getInt8PtrTy(Basis.Ins->getContext(), AS);
         Reduced = Builder.CreateBitCast(Basis.Ins, CharTy);
         if (InBounds)
-          Reduced = Builder.CreateInBoundsGEP(Reduced, Bump);
+          Reduced =
+              Builder.CreateInBoundsGEP(Builder.getInt8Ty(), Reduced, Bump);
         else
           Reduced = Builder.CreateGEP(Builder.getInt8Ty(), Reduced, Bump);
         Reduced = Builder.CreateBitCast(Reduced, C.Ins->getType());
@@ -489,7 +490,7 @@
         // Canonicalize bump to pointer size.
         Bump = Builder.CreateSExtOrTrunc(Bump, IntPtrTy);
         if (InBounds)
-          Reduced = Builder.CreateInBoundsGEP(Basis.Ins, Bump);
+          Reduced = Builder.CreateInBoundsGEP(nullptr, Basis.Ins, Bump);
         else
           Reduced = Builder.CreateGEP(nullptr, Basis.Ins, Bump);
       }