Skip to content

Commit

Permalink
[SVE] Upgrade VectorType tests to test new types
Browse files Browse the repository at this point in the history
Reviewers: efriedma, sdesmalen, c-rhodes, ddunbar

Reviewed By: sdesmalen

Subscribers: huntergr, tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78831
  • Loading branch information
christetreault-llvm committed Apr 29, 2020
1 parent e1de277 commit 0700cb6
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 86 deletions.
5 changes: 2 additions & 3 deletions llvm/include/llvm/IR/DerivedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,8 @@ class VectorType : public Type {
/// input type and the same element type.
static VectorType *getDoubleElementsVectorType(VectorType *VTy) {
auto EltCnt = VTy->getElementCount();
assert((VTy->getNumElements() * 2ull) <= UINT_MAX &&
"Too many elements in vector");
return VectorType::get(VTy->getElementType(), EltCnt*2);
assert((EltCnt.Min * 2ull) <= UINT_MAX && "Too many elements in vector");
return VectorType::get(VTy->getElementType(), EltCnt * 2);
}

/// Return true if the specified type is valid as a element type.
Expand Down
Loading

0 comments on commit 0700cb6

Please sign in to comment.