[SVE] Eliminate calls to default-false VectorType::get() from Linker

Reviewers: efriedma, tejohnson, sdesmalen, c-rhodes

Reviewed By: efriedma

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80326
This commit is contained in:
Christopher Tetreault 2020-05-29 16:17:40 -07:00
parent 02f6f1ebb1
commit 77b1ed4b4a

View File

@ -305,10 +305,11 @@ Type *TypeMapTy::get(Type *Ty, SmallPtrSet<StructType *, 8> &Visited) {
case Type::ArrayTyID:
return *Entry = ArrayType::get(ElementTypes[0],
cast<ArrayType>(Ty)->getNumElements());
case Type::FixedVectorTyID:
case Type::ScalableVectorTyID:
return *Entry = VectorType::get(ElementTypes[0],
cast<VectorType>(Ty)->getNumElements());
// FIXME: handle scalable vectors
case Type::FixedVectorTyID:
return *Entry = FixedVectorType::get(
ElementTypes[0], cast<FixedVectorType>(Ty)->getNumElements());
case Type::PointerTyID:
return *Entry = PointerType::get(ElementTypes[0],
cast<PointerType>(Ty)->getAddressSpace());