[libcxx-commits] [clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)
Eli Friedman via libcxx-commits
libcxx-commits at lists.llvm.org
Sun May 3 20:24:53 PDT 2026
================
@@ -2857,6 +2871,17 @@ struct PaddingClearer {
ElementQualType, /*VisitVirtualBase*/ true});
}
+ void VisitVector(const clang::VectorType *VT, uint64_t StartBitOffset) {
+ ASTContext &Ctx = CGF.getContext();
+ uint64_t SizeBit = [&]() -> uint64_t {
+ if (VT->isPackedVectorBoolType(Ctx))
+ return VT->getNumElements();
+ return Ctx.getTypeInfo(VT->getElementType()).Width * VT->getNumElements();
----------------
efriedma-quic wrote:
I think you might need to use getScalarOccupiedSizeInBits() here as well? Consider a vector of x86 long double.
https://github.com/llvm/llvm-project/pull/75371
More information about the libcxx-commits
mailing list