[PATCH] D142550: Fix sizeof of boolean vector

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 26 02:01:03 PST 2023


Fznamznon added inline comments.


================
Comment at: clang/test/SemaCXX/vector-bool.cpp:97
+  using NineBools = bool __attribute__((ext_vector_type(9)));
+  using ABunchOfBools = bool __attribute__((ext_vector_type(28)));
   static_assert(sizeof(FourBools) == 1);
----------------
erichkeane wrote:
> Fznamznon wrote:
> > erichkeane wrote:
> > > How about 33?  Does it grow appropriately with alignment?
> > Its sizeof evaluates to 8. Looking at the code in ASTContext that seems to be appropriate result since 8 is a next power of 2 after 4.
> Yep, that makes sense to me!  Can you do 1 more group for me?  
> 
> 65, 129, 150, 195, 257?
> 
> 
Sure, done. Seems to be working in the same way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142550



More information about the cfe-commits mailing list