diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h --- a/llvm/include/llvm/IR/DerivedTypes.h +++ b/llvm/include/llvm/IR/DerivedTypes.h @@ -504,9 +504,8 @@ /// input type and the same element type. static VectorType *getDoubleElementsVectorType(VectorType *VTy) { auto EltCnt = VTy->getElementCount(); - assert((VTy->getNumElements() * 2ull) <= UINT_MAX && - "Too many elements in vector"); - return VectorType::get(VTy->getElementType(), EltCnt*2); + assert((EltCnt.Min * 2ull) <= UINT_MAX && "Too many elements in vector"); + return VectorType::get(VTy->getElementType(), EltCnt * 2); } /// Return true if the specified type is valid as a element type. diff --git a/llvm/unittests/IR/VectorTypesTest.cpp b/llvm/unittests/IR/VectorTypesTest.cpp --- a/llvm/unittests/IR/VectorTypesTest.cpp +++ b/llvm/unittests/IR/VectorTypesTest.cpp @@ -14,72 +14,118 @@ using namespace llvm; namespace { + +std::string printVTy(const VectorType *VTy) { + std::string Res; + raw_string_ostream OS(Res); + VTy->print(OS); + OS.flush(); + return Res; +} + +#define EXPECT_VTY_EQ(LHS, RHS) \ + ASSERT_NE(LHS, nullptr) << #LHS << " must not be null"; \ + ASSERT_NE(RHS, nullptr) << #RHS << " must not be null"; \ + EXPECT_EQ(LHS, RHS) << "Expect that " << #LHS << " == " << #RHS << " where " \ + << #LHS << " = " << printVTy(LHS) << " and " << #RHS \ + << " = " << printVTy(RHS); + +#define EXPECT_VTY_NE(LHS, RHS) \ + ASSERT_NE(LHS, nullptr) << #LHS << " must not be null"; \ + ASSERT_NE(RHS, nullptr) << #RHS << " must not be null"; \ + EXPECT_NE(LHS, RHS) << "Expect that " << #LHS << " != " << #RHS << " where " \ + << #LHS << " = " << printVTy(LHS) << " and " << #RHS \ + << " = " << printVTy(RHS); + TEST(VectorTypesTest, FixedLength) { LLVMContext Ctx; + Type *Int8Ty = Type::getInt8Ty(Ctx); Type *Int16Ty = Type::getInt16Ty(Ctx); Type *Int32Ty = Type::getInt32Ty(Ctx); Type *Int64Ty = Type::getInt64Ty(Ctx); Type *Float64Ty = Type::getDoubleTy(Ctx); - VectorType *V8Int32Ty = VectorType::get(Int32Ty, 8); - ASSERT_TRUE(isa(V8Int32Ty)); + auto *V16Int8Ty = FixedVectorType::get(Int8Ty, 16); + ASSERT_NE(nullptr, V16Int8Ty); + EXPECT_EQ(V16Int8Ty->getNumElements(), 16U); + EXPECT_EQ(V16Int8Ty->getElementType()->getScalarSizeInBits(), 8U); + + auto *V8Int32Ty = dyn_cast(VectorType::get(Int32Ty, 8)); + ASSERT_NE(nullptr, V8Int32Ty); EXPECT_EQ(V8Int32Ty->getNumElements(), 8U); EXPECT_EQ(V8Int32Ty->getElementType()->getScalarSizeInBits(), 32U); - VectorType *V8Int16Ty = VectorType::get(Int16Ty, {8, false}); - ASSERT_TRUE(isa(V8Int16Ty)); + auto *V8Int32TyExplicitFalse = + dyn_cast(VectorType::get(Int32Ty, 8, false)); + EXPECT_VTY_EQ(V8Int32Ty, V8Int32TyExplicitFalse); + + auto *V8Int8Ty = + dyn_cast(VectorType::get(Int8Ty, V8Int32Ty)); + EXPECT_VTY_NE(V8Int32Ty, V8Int8Ty); + EXPECT_EQ(V8Int8Ty->getNumElements(), V8Int32Ty->getNumElements()); + EXPECT_EQ(V8Int8Ty->getElementType()->getScalarSizeInBits(), 8U); + + auto *V8Int32Ty2 = + dyn_cast(VectorType::get(Int32Ty, V8Int32Ty)); + EXPECT_VTY_EQ(V8Int32Ty, V8Int32Ty2); + + auto *V8Int16Ty = + dyn_cast(VectorType::get(Int16Ty, {8, false})); + ASSERT_NE(nullptr, V8Int16Ty); EXPECT_EQ(V8Int16Ty->getNumElements(), 8U); EXPECT_EQ(V8Int16Ty->getElementType()->getScalarSizeInBits(), 16U); ElementCount EltCnt(4, false); - VectorType *V4Int64Ty = VectorType::get(Int64Ty, EltCnt); - ASSERT_TRUE(isa(V4Int64Ty)); + auto *V4Int64Ty = dyn_cast(VectorType::get(Int64Ty, EltCnt)); + ASSERT_NE(nullptr, V4Int64Ty); EXPECT_EQ(V4Int64Ty->getNumElements(), 4U); EXPECT_EQ(V4Int64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *V2Int64Ty = VectorType::get(Int64Ty, EltCnt/2); - ASSERT_TRUE(isa(V2Int64Ty)); + auto *V2Int64Ty = + dyn_cast(VectorType::get(Int64Ty, EltCnt / 2)); + ASSERT_NE(nullptr, V2Int64Ty); EXPECT_EQ(V2Int64Ty->getNumElements(), 2U); EXPECT_EQ(V2Int64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *V8Int64Ty = VectorType::get(Int64Ty, EltCnt*2); - ASSERT_TRUE(isa(V8Int64Ty)); + auto *V8Int64Ty = + dyn_cast(VectorType::get(Int64Ty, EltCnt * 2)); + ASSERT_NE(nullptr, V8Int64Ty); EXPECT_EQ(V8Int64Ty->getNumElements(), 8U); EXPECT_EQ(V8Int64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *V4Float64Ty = VectorType::get(Float64Ty, EltCnt); - ASSERT_TRUE(isa(V4Float64Ty)); + auto *V4Float64Ty = + dyn_cast(VectorType::get(Float64Ty, EltCnt)); + ASSERT_NE(nullptr, V4Float64Ty); EXPECT_EQ(V4Float64Ty->getNumElements(), 4U); EXPECT_EQ(V4Float64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ExtTy = VectorType::getExtendedElementVectorType(V8Int16Ty); - EXPECT_EQ(ExtTy, V8Int32Ty); - ASSERT_TRUE(isa(ExtTy)); + auto *ExtTy = dyn_cast( + VectorType::getExtendedElementVectorType(V8Int16Ty)); + EXPECT_VTY_EQ(ExtTy, V8Int32Ty); EXPECT_EQ(ExtTy->getNumElements(), 8U); EXPECT_EQ(ExtTy->getElementType()->getScalarSizeInBits(), 32U); - VectorType *TruncTy = VectorType::getTruncatedElementVectorType(V8Int32Ty); - EXPECT_EQ(TruncTy, V8Int16Ty); - ASSERT_TRUE(isa(TruncTy)); + auto *TruncTy = dyn_cast( + VectorType::getTruncatedElementVectorType(V8Int32Ty)); + EXPECT_VTY_EQ(TruncTy, V8Int16Ty); EXPECT_EQ(TruncTy->getNumElements(), 8U); EXPECT_EQ(TruncTy->getElementType()->getScalarSizeInBits(), 16U); - VectorType *HalvedTy = VectorType::getHalfElementsVectorType(V4Int64Ty); - EXPECT_EQ(HalvedTy, V2Int64Ty); - ASSERT_TRUE(isa(HalvedTy)); + auto *HalvedTy = dyn_cast( + VectorType::getHalfElementsVectorType(V4Int64Ty)); + EXPECT_VTY_EQ(HalvedTy, V2Int64Ty); EXPECT_EQ(HalvedTy->getNumElements(), 2U); EXPECT_EQ(HalvedTy->getElementType()->getScalarSizeInBits(), 64U); - VectorType *DoubledTy = VectorType::getDoubleElementsVectorType(V4Int64Ty); - EXPECT_EQ(DoubledTy, V8Int64Ty); - ASSERT_TRUE(isa(DoubledTy)); + auto *DoubledTy = dyn_cast( + VectorType::getDoubleElementsVectorType(V4Int64Ty)); + EXPECT_VTY_EQ(DoubledTy, V8Int64Ty); EXPECT_EQ(DoubledTy->getNumElements(), 8U); EXPECT_EQ(DoubledTy->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ConvTy = VectorType::getInteger(V4Float64Ty); - EXPECT_EQ(ConvTy, V4Int64Ty); - ASSERT_TRUE(isa(ConvTy)); + auto *ConvTy = dyn_cast(VectorType::getInteger(V4Float64Ty)); + EXPECT_VTY_EQ(ConvTy, V4Int64Ty); EXPECT_EQ(ConvTy->getNumElements(), 4U); EXPECT_EQ(ConvTy->getElementType()->getScalarSizeInBits(), 64U); @@ -91,70 +137,92 @@ TEST(VectorTypesTest, Scalable) { LLVMContext Ctx; + Type *Int8Ty = Type::getInt8Ty(Ctx); Type *Int16Ty = Type::getInt16Ty(Ctx); Type *Int32Ty = Type::getInt32Ty(Ctx); Type *Int64Ty = Type::getInt64Ty(Ctx); Type *Float64Ty = Type::getDoubleTy(Ctx); - VectorType *ScV8Int32Ty = VectorType::get(Int32Ty, 8, true); - ASSERT_TRUE(isa(ScV8Int32Ty)); - EXPECT_EQ(ScV8Int32Ty->getNumElements(), 8U); + auto *ScV16Int8Ty = ScalableVectorType::get(Int8Ty, 16); + ASSERT_NE(nullptr, ScV16Int8Ty); + EXPECT_EQ(ScV16Int8Ty->getMinNumElements(), 16U); + EXPECT_EQ(ScV16Int8Ty->getScalarSizeInBits(), 8U); + + auto *ScV8Int32Ty = + dyn_cast(VectorType::get(Int32Ty, 8, true)); + ASSERT_NE(nullptr, ScV8Int32Ty); + EXPECT_EQ(ScV8Int32Ty->getMinNumElements(), 8U); EXPECT_EQ(ScV8Int32Ty->getElementType()->getScalarSizeInBits(), 32U); - VectorType *ScV8Int16Ty = VectorType::get(Int16Ty, {8, true}); - ASSERT_TRUE(isa(ScV8Int16Ty)); - EXPECT_EQ(ScV8Int16Ty->getNumElements(), 8U); + auto *ScV8Int8Ty = + dyn_cast(VectorType::get(Int8Ty, ScV8Int32Ty)); + EXPECT_VTY_NE(ScV8Int32Ty, ScV8Int8Ty); + EXPECT_EQ(ScV8Int8Ty->getMinNumElements(), ScV8Int32Ty->getMinNumElements()); + EXPECT_EQ(ScV8Int8Ty->getElementType()->getScalarSizeInBits(), 8U); + + auto *ScV8Int32Ty2 = + dyn_cast(VectorType::get(Int32Ty, ScV8Int32Ty)); + EXPECT_VTY_EQ(ScV8Int32Ty, ScV8Int32Ty2); + + auto *ScV8Int16Ty = + dyn_cast(VectorType::get(Int16Ty, {8, true})); + ASSERT_NE(nullptr, ScV8Int16Ty); + EXPECT_EQ(ScV8Int16Ty->getMinNumElements(), 8U); EXPECT_EQ(ScV8Int16Ty->getElementType()->getScalarSizeInBits(), 16U); ElementCount EltCnt(4, true); - VectorType *ScV4Int64Ty = VectorType::get(Int64Ty, EltCnt); - ASSERT_TRUE(isa(ScV4Int64Ty)); - EXPECT_EQ(ScV4Int64Ty->getNumElements(), 4U); + auto *ScV4Int64Ty = + dyn_cast(VectorType::get(Int64Ty, EltCnt)); + ASSERT_NE(nullptr, ScV4Int64Ty); + EXPECT_EQ(ScV4Int64Ty->getMinNumElements(), 4U); EXPECT_EQ(ScV4Int64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ScV2Int64Ty = VectorType::get(Int64Ty, EltCnt/2); - ASSERT_TRUE(isa(ScV2Int64Ty)); - EXPECT_EQ(ScV2Int64Ty->getNumElements(), 2U); + auto *ScV2Int64Ty = + dyn_cast(VectorType::get(Int64Ty, EltCnt / 2)); + ASSERT_NE(nullptr, ScV2Int64Ty); + EXPECT_EQ(ScV2Int64Ty->getMinNumElements(), 2U); EXPECT_EQ(ScV2Int64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ScV8Int64Ty = VectorType::get(Int64Ty, EltCnt*2); - ASSERT_TRUE(isa(ScV8Int64Ty)); - EXPECT_EQ(ScV8Int64Ty->getNumElements(), 8U); + auto *ScV8Int64Ty = + dyn_cast(VectorType::get(Int64Ty, EltCnt * 2)); + ASSERT_NE(nullptr, ScV8Int64Ty); + EXPECT_EQ(ScV8Int64Ty->getMinNumElements(), 8U); EXPECT_EQ(ScV8Int64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ScV4Float64Ty = VectorType::get(Float64Ty, EltCnt); - ASSERT_TRUE(isa(ScV4Float64Ty)); - EXPECT_EQ(ScV4Float64Ty->getNumElements(), 4U); + auto *ScV4Float64Ty = + dyn_cast(VectorType::get(Float64Ty, EltCnt)); + ASSERT_NE(nullptr, ScV4Float64Ty); + EXPECT_EQ(ScV4Float64Ty->getMinNumElements(), 4U); EXPECT_EQ(ScV4Float64Ty->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ExtTy = VectorType::getExtendedElementVectorType(ScV8Int16Ty); - EXPECT_EQ(ExtTy, ScV8Int32Ty); - ASSERT_TRUE(isa(ExtTy)); - EXPECT_EQ(ExtTy->getNumElements(), 8U); + auto *ExtTy = dyn_cast( + VectorType::getExtendedElementVectorType(ScV8Int16Ty)); + EXPECT_VTY_EQ(ExtTy, ScV8Int32Ty); + EXPECT_EQ(ExtTy->getMinNumElements(), 8U); EXPECT_EQ(ExtTy->getElementType()->getScalarSizeInBits(), 32U); - VectorType *TruncTy = VectorType::getTruncatedElementVectorType(ScV8Int32Ty); - EXPECT_EQ(TruncTy, ScV8Int16Ty); - ASSERT_TRUE(isa(TruncTy)); - EXPECT_EQ(TruncTy->getNumElements(), 8U); + auto *TruncTy = dyn_cast( + VectorType::getTruncatedElementVectorType(ScV8Int32Ty)); + EXPECT_VTY_EQ(TruncTy, ScV8Int16Ty); + EXPECT_EQ(TruncTy->getMinNumElements(), 8U); EXPECT_EQ(TruncTy->getElementType()->getScalarSizeInBits(), 16U); - VectorType *HalvedTy = VectorType::getHalfElementsVectorType(ScV4Int64Ty); - EXPECT_EQ(HalvedTy, ScV2Int64Ty); - ASSERT_TRUE(isa(HalvedTy)); - EXPECT_EQ(HalvedTy->getNumElements(), 2U); + auto *HalvedTy = dyn_cast( + VectorType::getHalfElementsVectorType(ScV4Int64Ty)); + EXPECT_VTY_EQ(HalvedTy, ScV2Int64Ty); + EXPECT_EQ(HalvedTy->getMinNumElements(), 2U); EXPECT_EQ(HalvedTy->getElementType()->getScalarSizeInBits(), 64U); - VectorType *DoubledTy = VectorType::getDoubleElementsVectorType(ScV4Int64Ty); - EXPECT_EQ(DoubledTy, ScV8Int64Ty); - ASSERT_TRUE(isa(DoubledTy)); - EXPECT_EQ(DoubledTy->getNumElements(), 8U); + auto *DoubledTy = dyn_cast( + VectorType::getDoubleElementsVectorType(ScV4Int64Ty)); + EXPECT_VTY_EQ(DoubledTy, ScV8Int64Ty); + EXPECT_EQ(DoubledTy->getMinNumElements(), 8U); EXPECT_EQ(DoubledTy->getElementType()->getScalarSizeInBits(), 64U); - VectorType *ConvTy = VectorType::getInteger(ScV4Float64Ty); - EXPECT_EQ(ConvTy, ScV4Int64Ty); - ASSERT_TRUE(isa(ConvTy)); - EXPECT_EQ(ConvTy->getNumElements(), 4U); + auto *ConvTy = + dyn_cast(VectorType::getInteger(ScV4Float64Ty)); + EXPECT_VTY_EQ(ConvTy, ScV4Int64Ty); + EXPECT_EQ(ConvTy->getMinNumElements(), 4U); EXPECT_EQ(ConvTy->getElementType()->getScalarSizeInBits(), 64U); EltCnt = ScV8Int64Ty->getElementCount(); @@ -162,6 +230,57 @@ ASSERT_TRUE(EltCnt.Scalable); } +TEST(VectorTypesTest, BaseVectorType) { + LLVMContext Ctx; + + Type *Int16Ty = Type::getInt16Ty(Ctx); + Type *Int32Ty = Type::getInt32Ty(Ctx); + + std::array VTys = {VectorType::get(Int16Ty, {4, true}), + VectorType::get(Int16Ty, {4, false}), + VectorType::get(Int16Ty, {2, true}), + VectorType::get(Int16Ty, {2, false}), + VectorType::get(Int32Ty, {4, true}), + VectorType::get(Int32Ty, {4, false}), + VectorType::get(Int32Ty, {2, true}), + VectorType::get(Int32Ty, {2, false})}; + + /* + The comparison matrix is symmetric, so we only check the upper triangle: + + (0,0) (0,1) (0,2) ... (0,7) + (1,0) (1,1) (1,2) . + (2,0) (2,1) (2,2) . + . . . + . . + . . + (7,0) ... (7,7) + */ + for (size_t I = 0, IEnd = VTys.size(); I < IEnd; ++I) { + // test I == J + VectorType *VI = VTys[I]; + ElementCount ECI = VI->getElementCount(); + EXPECT_EQ(isa(VI), ECI.Scalable); + + for (size_t J = I + 1, JEnd = VTys.size(); J < JEnd; ++J) { + // test I < J + VectorType *VJ = VTys[J]; + ElementCount ECJ = VJ->getElementCount(); + EXPECT_VTY_NE(VI, VJ); + + VectorType *VJPrime = VectorType::get(VI->getElementType(), VJ); + if (VI->getElementType() == VJ->getElementType()) { + EXPECT_VTY_EQ(VJ, VJPrime); + } else { + EXPECT_VTY_NE(VJ, VJPrime); + } + + EXPECT_EQ(VJ->getTypeID(), VJPrime->getTypeID()) + << "VJ and VJPrime are the same sort of vector"; + } + } +} + TEST(VectorTypesTest, FixedLenComparisons) { LLVMContext Ctx; DataLayout DL(""); @@ -169,10 +288,10 @@ Type *Int32Ty = Type::getInt32Ty(Ctx); Type *Int64Ty = Type::getInt64Ty(Ctx); - VectorType *V2Int32Ty = VectorType::get(Int32Ty, 2); - VectorType *V4Int32Ty = VectorType::get(Int32Ty, 4); + auto *V2Int32Ty = FixedVectorType::get(Int32Ty, 2); + auto *V4Int32Ty = FixedVectorType::get(Int32Ty, 4); - VectorType *V2Int64Ty = VectorType::get(Int64Ty, 2); + auto *V2Int64Ty = FixedVectorType::get(Int64Ty, 2); TypeSize V2I32Len = V2Int32Ty->getPrimitiveSizeInBits(); EXPECT_EQ(V2I32Len.getKnownMinSize(), 64U); @@ -192,18 +311,15 @@ V4Int32Ty->getPrimitiveSizeInBits().getFixedSize()); // Check the DataLayout interfaces. - EXPECT_EQ(DL.getTypeSizeInBits(V2Int64Ty), - DL.getTypeSizeInBits(V4Int32Ty)); + EXPECT_EQ(DL.getTypeSizeInBits(V2Int64Ty), DL.getTypeSizeInBits(V4Int32Ty)); EXPECT_EQ(DL.getTypeSizeInBits(V2Int32Ty), 64U); EXPECT_EQ(DL.getTypeSizeInBits(V2Int64Ty), 128U); - EXPECT_EQ(DL.getTypeStoreSize(V2Int64Ty), - DL.getTypeStoreSize(V4Int32Ty)); + EXPECT_EQ(DL.getTypeStoreSize(V2Int64Ty), DL.getTypeStoreSize(V4Int32Ty)); EXPECT_NE(DL.getTypeStoreSizeInBits(V2Int32Ty), DL.getTypeStoreSizeInBits(V2Int64Ty)); EXPECT_EQ(DL.getTypeStoreSizeInBits(V2Int32Ty), 64U); EXPECT_EQ(DL.getTypeStoreSize(V2Int64Ty), 16U); - EXPECT_EQ(DL.getTypeAllocSize(V4Int32Ty), - DL.getTypeAllocSize(V2Int64Ty)); + EXPECT_EQ(DL.getTypeAllocSize(V4Int32Ty), DL.getTypeAllocSize(V2Int64Ty)); EXPECT_NE(DL.getTypeAllocSizeInBits(V2Int32Ty), DL.getTypeAllocSizeInBits(V2Int64Ty)); EXPECT_EQ(DL.getTypeAllocSizeInBits(V4Int32Ty), 128U); @@ -218,10 +334,10 @@ Type *Int32Ty = Type::getInt32Ty(Ctx); Type *Int64Ty = Type::getInt64Ty(Ctx); - VectorType *ScV2Int32Ty = VectorType::get(Int32Ty, {2, true}); - VectorType *ScV4Int32Ty = VectorType::get(Int32Ty, {4, true}); + auto *ScV2Int32Ty = ScalableVectorType::get(Int32Ty, 2); + auto *ScV4Int32Ty = ScalableVectorType::get(Int32Ty, 4); - VectorType *ScV2Int64Ty = VectorType::get(Int64Ty, {2, true}); + auto *ScV2Int64Ty = ScalableVectorType::get(Int64Ty, 2); TypeSize ScV2I32Len = ScV2Int32Ty->getPrimitiveSizeInBits(); EXPECT_EQ(ScV2I32Len.getKnownMinSize(), 64U); @@ -240,14 +356,12 @@ EXPECT_EQ(DL.getTypeSizeInBits(ScV2Int64Ty), DL.getTypeSizeInBits(ScV4Int32Ty)); EXPECT_EQ(DL.getTypeSizeInBits(ScV2Int32Ty).getKnownMinSize(), 64U); - EXPECT_EQ(DL.getTypeStoreSize(ScV2Int64Ty), - DL.getTypeStoreSize(ScV4Int32Ty)); + EXPECT_EQ(DL.getTypeStoreSize(ScV2Int64Ty), DL.getTypeStoreSize(ScV4Int32Ty)); EXPECT_NE(DL.getTypeStoreSizeInBits(ScV2Int32Ty), DL.getTypeStoreSizeInBits(ScV2Int64Ty)); EXPECT_EQ(DL.getTypeStoreSizeInBits(ScV2Int32Ty).getKnownMinSize(), 64U); EXPECT_EQ(DL.getTypeStoreSize(ScV2Int64Ty).getKnownMinSize(), 16U); - EXPECT_EQ(DL.getTypeAllocSize(ScV4Int32Ty), - DL.getTypeAllocSize(ScV2Int64Ty)); + EXPECT_EQ(DL.getTypeAllocSize(ScV4Int32Ty), DL.getTypeAllocSize(ScV2Int64Ty)); EXPECT_NE(DL.getTypeAllocSizeInBits(ScV2Int32Ty), DL.getTypeAllocSizeInBits(ScV2Int64Ty)); EXPECT_EQ(DL.getTypeAllocSizeInBits(ScV4Int32Ty).getKnownMinSize(), 128U); @@ -260,8 +374,8 @@ Type *Int32Ty = Type::getInt32Ty(Ctx); - VectorType *V4Int32Ty = VectorType::get(Int32Ty, {4, false}); - VectorType *ScV4Int32Ty = VectorType::get(Int32Ty, {4, true}); + auto *V4Int32Ty = FixedVectorType::get(Int32Ty, 4); + auto *ScV4Int32Ty = ScalableVectorType::get(Int32Ty, 4); // Even though the minimum size is the same, a scalable vector could be // larger so we don't consider them to be the same size.