To support creating both a mask with just a single true and false values,
I had to relax the restriction in the verifier that the rank is always equal to
the length of the attribute array, in other words, we now allow:
- vector.constant_mask [0] : vector<i1> which gets lowered to arith.constant dense<false> : vector<i1>
- vector.constant_mask [1] : vector<i1> which gets lowered to arith.constant dense<true> : vector<i1>
(the attribute list for the 0-D case must be a singleton containing
either 0 or 1)
I think this is too confusing to put in Builders.h and I would just avoid it.
It is also inconsistent, al APIs would have to be updated.
At the very minimum I'd spell it getZeroDimBoolVectorAttr(bool value) but I think @rriddle wouldn't buy it, never hurts to ask though.
Spelling it explicitly at use the corner-case use sites is better IMO.