[PATCH] D142550: Fix sizeof of boolean vector

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 25 09:56:23 PST 2023


erichkeane added a comment.

Just a couple more I'm concerned about after thinking about it, otherwise this looks about right.



================
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);
----------------
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?




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