[llvm] 28cc956 - SupportTests/MachineValueType.h: Catch up llvmorg-17-init-8340-gb68b94f6f40b

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 16:53:36 PDT 2023


Author: NAKAMURA Takumi
Date: 2023-04-25T08:53:17+09:00
New Revision: 28cc956054bd4e618513eefbe3db50b6df49b00f

URL: https://github.com/llvm/llvm-project/commit/28cc956054bd4e618513eefbe3db50b6df49b00f
DIFF: https://github.com/llvm/llvm-project/commit/28cc956054bd4e618513eefbe3db50b6df49b00f.diff

LOG: SupportTests/MachineValueType.h: Catch up llvmorg-17-init-8340-gb68b94f6f40b

Added: 
    

Modified: 
    llvm/unittests/Support/MachineValueType.h

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/MachineValueType.h b/llvm/unittests/Support/MachineValueType.h
index 9e6f2b6cda5b..3c1870ff5cee 100644
--- a/llvm/unittests/Support/MachineValueType.h
+++ b/llvm/unittests/Support/MachineValueType.h
@@ -246,6 +246,14 @@ namespace llvm::tmp {
       return getVectorVT(EltVT, EltCnt.divideCoefficientBy(2));
     }
 
+    // Return a VT for a vector type with the same element type but
+    // double the number of elements.
+    MVT getDoubleNumVectorElementsVT() const {
+      MVT EltVT = getVectorElementType();
+      auto EltCnt = getVectorElementCount();
+      return MVT::getVectorVT(EltVT, EltCnt * 2);
+    }
+
     /// Returns true if the given vector is a power of 2.
     bool isPow2VectorType() const {
       unsigned NElts = getVectorMinNumElements();


        


More information about the llvm-commits mailing list