aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2023-04-25 07:07:19 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2023-04-25 08:53:17 +0900
commit28cc956054bd4e618513eefbe3db50b6df49b00f (patch)
tree3abc6b97dac806a70fc695f49e335f2af1ca4d7c
parentd45fae601067f03e8b4a5a59507ad3aaf7613ac4 (diff)
downloadllvm-28cc956054bd4e618513eefbe3db50b6df49b00f.zip
llvm-28cc956054bd4e618513eefbe3db50b6df49b00f.tar.gz
llvm-28cc956054bd4e618513eefbe3db50b6df49b00f.tar.bz2
SupportTests/MachineValueType.h: Catch up llvmorg-17-init-8340-gb68b94f6f40b
-rw-r--r--llvm/unittests/Support/MachineValueType.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/Support/MachineValueType.h b/llvm/unittests/Support/MachineValueType.h
index 9e6f2b6..3c1870f 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();