[PATCH] D78967: [SVE] Remove invalid usage of VectorType::getNumElements in Function

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 15:39:46 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/IR/Function.cpp:1081
+    // FIXME: Explicit conversion from fixed to scalable vector. Can/should this
+    // happen?
+    return ScalableVectorType::get(Ty->getElementType(),
----------------
It's intentional.  See EncodeFixedType in llvm/utils/TableGen/IntrinsicEmitter.cpp .  Actually, Ty should always be a FixedVectorType here, I think; maybe we can just `cast<FixedVectorType>` here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78967/new/

https://reviews.llvm.org/D78967





More information about the llvm-commits mailing list