Skip to content

Commit 28cc956

Browse files
committed
SupportTests/MachineValueType.h: Catch up llvmorg-17-init-8340-gb68b94f6f40b
1 parent d45fae6 commit 28cc956

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/unittests/Support/MachineValueType.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ namespace llvm::tmp {
246246
return getVectorVT(EltVT, EltCnt.divideCoefficientBy(2));
247247
}
248248

249+
// Return a VT for a vector type with the same element type but
250+
// double the number of elements.
251+
MVT getDoubleNumVectorElementsVT() const {
252+
MVT EltVT = getVectorElementType();
253+
auto EltCnt = getVectorElementCount();
254+
return MVT::getVectorVT(EltVT, EltCnt * 2);
255+
}
256+
249257
/// Returns true if the given vector is a power of 2.
250258
bool isPow2VectorType() const {
251259
unsigned NElts = getVectorMinNumElements();

0 commit comments

Comments
 (0)