simoll added a comment.

The Hexagon builtins explicitly require bool vectors to have 8-bit wide bool 
elements. That clashes with our new vector type because bool vectors in builtin 
functions and vector_size bool vectors have the same internal representation in 
Clang. However, AFAIK Hexagon is the only target that actually need 8-bit 
bools. I see two possible ways out of this:

1. Introduce a `Bit` type in Clang that is only constructible as a vector 
element type. This way, any existing users of generic bool vectors are 
undisturbed. VE can use `Bit` in its builtin declarations to match the 
vector_size bool type. We may re-purpose the `Bit` type for a proper boolean 
vector type in the future.
2. Add a new target property: `BoolInVectorSize` that is the size of a bool 
element in boolean vectors. Hexagon, as most targets, would define 
`BoolInVectorSize = BoolSize`. VE would define `BoolInVectorSize = 1` for the 
intended behavior.

My preference is for 2. since it means small changes to the current patch and 
less surprises than the other option. Opinions?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81083

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

Reply via email to