[PATCH] D88994: Fix the default alignment of i1 vectors.

Xiaoqiang Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 00:11:12 PST 2022


csstormq added inline comments.


================
Comment at: llvm/lib/IR/DataLayout.cpp:807
     // count should be enough here.
-    Alignment *= cast<VectorType>(Ty)->getElementCount().getKnownMinValue();
-    Alignment = PowerOf2Ceil(Alignment);
-    return Align(Alignment);
+    return Align(PowerOf2Ceil(getTypeStoreSize(Ty).getKnownMinSize()));
   }
----------------
Is there any way to set the alignment of fixed vector type to 1 byte rather than a power of 2 by default?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88994



More information about the cfe-commits mailing list