[SVE] Eliminate calls to default-false VectorType::get() from Linker
authorChristopher Tetreault <ctetreau@quicinc.com>
Fri, 29 May 2020 23:17:40 +0000 (16:17 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Sat, 30 May 2020 00:43:15 +0000 (17:43 -0700)
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

llvm/lib/Linker/IRMover.cpp

index ce11335..055689b 100644 (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());