diff --git a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp --- a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp +++ b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp @@ -148,7 +148,7 @@ // Cast elementwise vector start pointer to a pointer to a vector // (EltType x NumElements)*. - Type *VecType = VectorType::get(EltType, NumElements); + auto *VecType = FixedVectorType::get(EltType, NumElements); Type *VecPtrType = PointerType::get(VecType, AS); return Builder.CreatePointerCast(VecStart, VecPtrType, "vec.cast"); } @@ -223,8 +223,8 @@ unsigned D = isColumnMajor() ? NumColumns : NumRows; for (unsigned J = 0; J < D; ++J) - addVector(UndefValue::get( - VectorType::get(EltTy, isColumnMajor() ? NumRows : NumColumns))); + addVector(UndefValue::get(FixedVectorType::get( + EltTy, isColumnMajor() ? NumRows : NumColumns))); } Value *getVector(unsigned i) const { return Vectors[i]; } @@ -806,8 +806,8 @@ Value *EltPtr = Builder.CreatePointerCast(MatrixPtr, PointerType::get(EltTy, AS)); Value *TileStart = Builder.CreateGEP(EltTy, EltPtr, Offset); - Type *TileTy = - VectorType::get(EltTy, ResultShape.NumRows * ResultShape.NumColumns); + auto *TileTy = FixedVectorType::get(EltTy, ResultShape.NumRows * + ResultShape.NumColumns); Type *TilePtrTy = PointerType::get(TileTy, AS); Value *TilePtr = Builder.CreatePointerCast(TileStart, TilePtrTy, "col.cast"); @@ -850,8 +850,8 @@ Value *EltPtr = Builder.CreatePointerCast(MatrixPtr, PointerType::get(EltTy, AS)); Value *TileStart = Builder.CreateGEP(EltTy, EltPtr, Offset); - Type *TileTy = VectorType::get(EltTy, StoreVal.getNumRows() * - StoreVal.getNumColumns()); + auto *TileTy = FixedVectorType::get(EltTy, StoreVal.getNumRows() * + StoreVal.getNumColumns()); Type *TilePtrTy = PointerType::get(TileTy, AS); Value *TilePtr = Builder.CreatePointerCast(TileStart, TilePtrTy, "col.cast"); @@ -1170,7 +1170,7 @@ MatrixTy getZeroMatrix(Type *EltType, unsigned R, unsigned C) { MatrixTy Res; - Type *ColumType = VectorType::get(EltType, R); + auto *ColumType = FixedVectorType::get(EltType, R); for (unsigned I = 0; I < C; ++I) Res.addVector(ConstantAggregateZero::get(ColumType)); return Res; @@ -1303,7 +1303,7 @@ for (unsigned I = 0; I < NewNumVecs; ++I) { // Build a single result vector. First initialize it. Value *ResultVector = UndefValue::get( - VectorType::get(VectorTy->getElementType(), NewNumElts)); + FixedVectorType::get(VectorTy->getElementType(), NewNumElts)); // Go through the old elements and insert it into the resulting vector. for (auto J : enumerate(InputMatrix.vectors())) { Value *Elt = Builder.CreateExtractElement(J.value(), I); diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1354,7 +1354,7 @@ auto AS = Ty->getScalarType()->getPointerAddressSpace(); Type *NewTy = Type::getInt8PtrTy(M->getContext(), AS); if (auto *VT = dyn_cast(Ty)) - NewTy = VectorType::get(NewTy, VT->getNumElements()); + NewTy = FixedVectorType::get(NewTy, VT->getNumElements()); return Intrinsic::getDeclaration(M, Intrinsic::experimental_gc_relocate, {NewTy}); }; diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -1818,7 +1818,7 @@ uint64_t NumElements = EndIndex - BeginIndex; Type *SliceTy = (NumElements == 1) ? Ty->getElementType() - : VectorType::get(Ty->getElementType(), NumElements); + : FixedVectorType::get(Ty->getElementType(), NumElements); Type *SplitIntTy = Type::getIntNTy(Ty->getContext(), NumElements * ElementSize * 8); @@ -2605,7 +2605,7 @@ assert(NumElements <= VecTy->getNumElements() && "Too many elements!"); Type *SliceTy = (NumElements == 1) ? ElementTy - : VectorType::get(ElementTy, NumElements); + : FixedVectorType::get(ElementTy, NumElements); if (V->getType() != SliceTy) V = convertValue(DL, IRB, V, SliceTy); @@ -2792,7 +2792,7 @@ return false; const auto Len = C->getZExtValue(); auto *Int8Ty = IntegerType::getInt8Ty(NewAI.getContext()); - auto *SrcTy = VectorType::get(Int8Ty, Len); + auto *SrcTy = FixedVectorType::get(Int8Ty, Len); return canConvertValue(DL, SrcTy, AllocaTy) && DL.isLegalInteger(DL.getTypeSizeInBits(ScalarTy).getFixedSize()); }(); @@ -3015,7 +3015,7 @@ if (NumElements == 1) OtherTy = VecTy->getElementType(); else - OtherTy = VectorType::get(VecTy->getElementType(), NumElements); + OtherTy = FixedVectorType::get(VecTy->getElementType(), NumElements); } else if (IntTy && !IsWholeAlloca) { OtherTy = SubIntTy; } else { diff --git a/llvm/lib/Transforms/Scalar/Scalarizer.cpp b/llvm/lib/Transforms/Scalar/Scalarizer.cpp --- a/llvm/lib/Transforms/Scalar/Scalarizer.cpp +++ b/llvm/lib/Transforms/Scalar/Scalarizer.cpp @@ -709,7 +709,7 @@ // -> . Convert each t1 to and copy the // individual elements to the destination. unsigned FanOut = DstNumElems / SrcNumElems; - Type *MidTy = VectorType::get(DstVT->getElementType(), FanOut); + auto *MidTy = FixedVectorType::get(DstVT->getElementType(), FanOut); unsigned ResI = 0; for (unsigned Op0I = 0; Op0I < SrcNumElems; ++Op0I) { Value *V = Op0[Op0I]; @@ -727,7 +727,7 @@ } else { // -> . Convert each group of into a t2. unsigned FanIn = SrcNumElems / DstNumElems; - Type *MidTy = VectorType::get(SrcVT->getElementType(), FanIn); + auto *MidTy = FixedVectorType::get(SrcVT->getElementType(), FanIn); unsigned Op0I = 0; for (unsigned ResI = 0; ResI < DstNumElems; ++ResI) { Value *V = UndefValue::get(MidTy);