Index: llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp =================================================================== --- llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp +++ llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp @@ -139,19 +139,23 @@ EXPECT_EQ(nxv4i32.getSizeInBits(), nxv2i64.getSizeInBits()); EXPECT_EQ(nxv2f64.getSizeInBits(), nxv2i64.getSizeInBits()); EXPECT_NE(nxv2i32.getSizeInBits(), nxv4i32.getSizeInBits()); - EXPECT_LT(nxv2i32.getSizeInBits(), nxv2i64.getSizeInBits()); - EXPECT_LE(nxv4i32.getSizeInBits(), nxv2i64.getSizeInBits()); - EXPECT_GT(nxv4i32.getSizeInBits(), nxv2i32.getSizeInBits()); - EXPECT_GE(nxv2i64.getSizeInBits(), nxv4i32.getSizeInBits()); + EXPECT_LT(nxv2i32.getSizeInBits().getKnownMinSize(), + nxv2i64.getSizeInBits().getKnownMinSize()); + EXPECT_LE(nxv4i32.getSizeInBits().getKnownMinSize(), + nxv2i64.getSizeInBits().getKnownMinSize()); + EXPECT_GT(nxv4i32.getSizeInBits().getKnownMinSize(), + nxv2i32.getSizeInBits().getKnownMinSize()); + EXPECT_GE(nxv2i64.getSizeInBits().getKnownMinSize(), + nxv4i32.getSizeInBits().getKnownMinSize()); // Check equivalence and ordering on fixed types. EXPECT_EQ(v4i32.getSizeInBits(), v2i64.getSizeInBits()); EXPECT_EQ(v2f64.getSizeInBits(), v2i64.getSizeInBits()); EXPECT_NE(v2i32.getSizeInBits(), v4i32.getSizeInBits()); - EXPECT_LT(v2i32.getSizeInBits(), v2i64.getSizeInBits()); - EXPECT_LE(v4i32.getSizeInBits(), v2i64.getSizeInBits()); - EXPECT_GT(v4i32.getSizeInBits(), v2i32.getSizeInBits()); - EXPECT_GE(v2i64.getSizeInBits(), v4i32.getSizeInBits()); + EXPECT_LT(v2i32.getFixedSizeInBits(), v2i64.getFixedSizeInBits()); + EXPECT_LE(v4i32.getFixedSizeInBits(), v2i64.getFixedSizeInBits()); + EXPECT_GT(v4i32.getFixedSizeInBits(), v2i32.getFixedSizeInBits()); + EXPECT_GE(v2i64.getFixedSizeInBits(), v4i32.getFixedSizeInBits()); // Check that scalable and non-scalable types with the same minimum size // are not considered equal. @@ -159,7 +163,7 @@ ASSERT_FALSE(v2i64.getSizeInBits() == nxv2f64.getSizeInBits()); // Check that we can obtain a known-exact size from a non-scalable type. - EXPECT_EQ(v4i32.getSizeInBits(), 128U); + EXPECT_EQ(v4i32.getFixedSizeInBits(), 128U); EXPECT_EQ(v2i64.getFixedSizeInBits(), 128U); // Check that we can query the known minimum size for both scalable and Index: llvm/unittests/IR/VectorTypesTest.cpp =================================================================== --- llvm/unittests/IR/VectorTypesTest.cpp +++ llvm/unittests/IR/VectorTypesTest.cpp @@ -286,10 +286,10 @@ EXPECT_EQ(V2I32Len.getKnownMinSize(), 64U); EXPECT_FALSE(V2I32Len.isScalable()); - EXPECT_LT(V2Int32Ty->getPrimitiveSizeInBits(), - V4Int32Ty->getPrimitiveSizeInBits()); - EXPECT_GT(V2Int64Ty->getPrimitiveSizeInBits(), - V2Int32Ty->getPrimitiveSizeInBits()); + EXPECT_LT(V2Int32Ty->getPrimitiveSizeInBits().getFixedSize(), + V4Int32Ty->getPrimitiveSizeInBits().getFixedSize()); + EXPECT_GT(V2Int64Ty->getPrimitiveSizeInBits().getFixedSize(), + V2Int32Ty->getPrimitiveSizeInBits().getFixedSize()); EXPECT_EQ(V4Int32Ty->getPrimitiveSizeInBits(), V2Int64Ty->getPrimitiveSizeInBits()); EXPECT_NE(V2Int32Ty->getPrimitiveSizeInBits(), @@ -332,14 +332,14 @@ EXPECT_EQ(ScV2I32Len.getKnownMinSize(), 64U); EXPECT_TRUE(ScV2I32Len.isScalable()); - EXPECT_LT(ScV2Int32Ty->getPrimitiveSizeInBits(), - ScV4Int32Ty->getPrimitiveSizeInBits()); - EXPECT_GT(ScV2Int64Ty->getPrimitiveSizeInBits(), - ScV2Int32Ty->getPrimitiveSizeInBits()); - EXPECT_EQ(ScV4Int32Ty->getPrimitiveSizeInBits(), - ScV2Int64Ty->getPrimitiveSizeInBits()); - EXPECT_NE(ScV2Int32Ty->getPrimitiveSizeInBits(), - ScV2Int64Ty->getPrimitiveSizeInBits()); + EXPECT_LT(ScV2Int32Ty->getPrimitiveSizeInBits().getKnownMinSize(), + ScV4Int32Ty->getPrimitiveSizeInBits().getKnownMinSize()); + EXPECT_GT(ScV2Int64Ty->getPrimitiveSizeInBits().getKnownMinSize(), + ScV2Int32Ty->getPrimitiveSizeInBits().getKnownMinSize()); + EXPECT_EQ(ScV4Int32Ty->getPrimitiveSizeInBits().getKnownMinSize(), + ScV2Int64Ty->getPrimitiveSizeInBits().getKnownMinSize()); + EXPECT_NE(ScV2Int32Ty->getPrimitiveSizeInBits().getKnownMinSize(), + ScV2Int64Ty->getPrimitiveSizeInBits().getKnownMinSize()); // Check the DataLayout interfaces. EXPECT_EQ(DL.getTypeSizeInBits(ScV2Int64Ty),