[PATCH] D62960: Add SVE opaque built-in types

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 09:17:49 PDT 2019


rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: lib/AST/ASTContext.cpp:1974
+      break;
+#include "clang/Basic/AArch64SVEACLETypes.def"
     }
----------------
rsandifo-arm wrote:
> rjmccall wrote:
> > Why do SVE predicates have 16-bit alignment?  Should this be 128-bit (16-*byte*)?
> > 
> > I guess these alignments are reasonable to hard-code here since they're target-specific for now.  That might be worth including in the comment.
> Yeah, in retrospect this is sorely lacking a comment.  The reason for using 16 is that there is one predicate bit for each vector byte, so the predicate size is a runtime multiple of 16 bits.  I've added a comment to say that and added a reference to the ABI that defines the alignments.
Thanks!

I'm surprised predicates don't require a higher alignment, even if it'd be excessive for very short vectors, but if that's the ABI rule, so be it.


Repository:
  rC Clang

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

https://reviews.llvm.org/D62960





More information about the cfe-commits mailing list