[clang] [clang] Fix size and alignment of packed sub-byte integer vectors (PR #161796)
Steffen Larsen via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 26 23:12:10 PST 2025
================
@@ -2677,6 +2677,16 @@ class ASTContext : public RefCountedBase<ASTContext> {
return getTypeSizeInCharsIfKnown(QualType(Ty, 0));
}
+ /// Return the size of an element inside a given vector type.
+ uint64_t getVectorElementSize(const VectorType *VTy) const {
+ QualType EltTy = VTy->getElementType();
+ if (VTy->isPackedVectorBoolType(*this))
----------------
steffenlarsen wrote:
The patch adds `isBitIntVectorType` which could be used below. Is that what you had in mind, or do you mean that `isBitIntVectorType` should check for HLSL as well?
https://github.com/llvm/llvm-project/pull/161796
More information about the cfe-commits
mailing list