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

The attribute bits LGTM, thanks!



================
Comment at: clang/lib/AST/ASTContext.cpp:1887
+
+unsigned getSvePredWidth(const Type *T) { return getSveVectorWidth(T) / 8; }
+
----------------
c-rhodes wrote:
> aaron.ballman wrote:
> > Should this be dividing by the number of bits in a char for the target as 
> > opposed to hard-coding to 8?
> > Should this be dividing by the number of bits in a char for the target as 
> > opposed to hard-coding to 8?
> 
> Predicate registers in SVE hold one bit per byte of a vector register so each 
> predicate is 1/8th the size of a vector which are defined in bits, it has to 
> be 8 and I know `getCharWidth` returns 8 for the target this is implemented 
> for but I dont know what it would mean for any other target or if we care 
> about that?
Ah, so this is a case where we expect that value to always be 8 where this 
feature is supported anyway -- good to know. I still think the current code is 
a cleaner approach to hard-coding 8 bits, so thank you for making the change 
even though it doesn't enable much.


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

https://reviews.llvm.org/D83551



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to