[PATCH] D103796: [Clang][RISCV] Implement vlsseg.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 15 22:47:22 PDT 2021


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:955
+      clang::CharUnits Align =
+          CGM.getNaturalTypeAlignment(getContext().getSizeType());
+      llvm::Value *V;
----------------
I don't think this alignment is correct. A vint16mf4_t creates an alloca with align of 2 and vint8mf4_t creates an alloca with an align of 1. So I think the store here needs to match the alignment you would get for the type we're storing. This is an issue in the earlier vlseg patch as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103796



More information about the cfe-commits mailing list