[NFC] Use TypeSize::getKnownMinValue() instead of TypeSize::getKnownMinSize()
authorGuillaume Chatelet <gchatelet@google.com>
Wed, 11 Jan 2023 16:25:52 +0000 (16:25 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Wed, 11 Jan 2023 16:29:29 +0000 (16:29 +0000)
This change is one of a series to implement the discussion from
https://reviews.llvm.org/D141134.

llvm/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/utils/TableGen/GlobalISelEmitter.cpp

index bbe04fc..dd04778 100644 (file)
@@ -544,9 +544,9 @@ bool TypeInfer::EnforceSmallerThan(TypeSetByHwMode &Small, TypeSetByHwMode &Big,
     // Always treat non-scalable MVTs as smaller than scalable MVTs for the
     // purposes of ordering.
     auto ASize = std::make_tuple(A.isScalableVector(), A.getScalarSizeInBits(),
-                                 A.getSizeInBits().getKnownMinSize());
+                                 A.getSizeInBits().getKnownMinValue());
     auto BSize = std::make_tuple(B.isScalableVector(), B.getScalarSizeInBits(),
-                                 B.getSizeInBits().getKnownMinSize());
+                                 B.getSizeInBits().getKnownMinValue());
     return ASize < BSize;
   };
   auto SameKindLE = [](MVT A, MVT B) -> bool {
@@ -558,9 +558,9 @@ bool TypeInfer::EnforceSmallerThan(TypeSetByHwMode &Small, TypeSetByHwMode &Big,
       return false;
 
     return std::make_tuple(A.getScalarSizeInBits(),
-                           A.getSizeInBits().getKnownMinSize()) <=
+                           A.getSizeInBits().getKnownMinValue()) <=
            std::make_tuple(B.getScalarSizeInBits(),
-                           B.getSizeInBits().getKnownMinSize());
+                           B.getSizeInBits().getKnownMinValue());
   };
 
   for (unsigned M : Modes) {
index ea63a9b..46b2ac4 100644 (file)
@@ -183,9 +183,10 @@ public:
            "Unexpected mismatch of scalable property");
     return Ty.isVector()
                ? std::make_tuple(Ty.isScalable(),
-                                 Ty.getSizeInBits().getKnownMinSize()) <
-                     std::make_tuple(Other.Ty.isScalable(),
-                                     Other.Ty.getSizeInBits().getKnownMinSize())
+                                 Ty.getSizeInBits().getKnownMinValue()) <
+                     std::make_tuple(
+                         Other.Ty.isScalable(),
+                         Other.Ty.getSizeInBits().getKnownMinValue())
                : Ty.getSizeInBits().getFixedSize() <
                      Other.Ty.getSizeInBits().getFixedSize();
   }