[PATCH] D117079: [RISCV] Improve i64 splat vector lowering in RV32.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 06:50:11 PST 2022


frasercrmck added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2219
+      MVT InterVT =
+          MVT::getScalableVectorVT(MVT::i32, 2 * VT.getVectorNumElements());
+      // TODO: if vl <= min(VLMAX), we can also do this. But we could not
----------------
I may be missing something, but isn't `VT.getVectorNumElements` problematic with scalable vector types? I'm surprised this doesn't warn/crash.

Also I'm not sure whether this method should assume that `VT` is scalable. Should it be able to produce a fixed-vector type if passed one?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117079



More information about the llvm-commits mailing list