[PATCH] D103527: [Clang][RISCV] Implement vlseg and vlsegff.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 12 18:51:54 PDT 2021


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:836
+      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/D103527/new/

https://reviews.llvm.org/D103527



More information about the cfe-commits mailing list