2016-02-19 20:36 GMT+03:00 Alan Lawrence <alan.lawrence@foss.arm.com>:
Mostly this is fairly straightforward, relatively little midend code is
required, and the backend cleans up quite a bit. However, I get stuck on the
case of singleton vectors (64x1). No surprises there, then...
The PR/68134 fix, makes the 'mask mode' for comparing 64x1 vectors, into
BLKmode, so that we get past this in expand_vector_operations:
/* A scalar operation pretending to be a vector one. */
if (VECTOR_BOOLEAN_TYPE_P (type)
&& !VECTOR_MODE_P (TYPE_MODE (type))
&& TYPE_MODE (type) != BLKmode)
return;
and we do the operation piecewise. (Which is what we want; there is only one
piece!)
However, with my vec_cmp + vcond_mask changes, dropping vconddidi, this
means we look for a vcond_maskdiblk and vec_cmpdiblk. Which doesn't really
feel right - it feels like the 64x1 mask should be a DImode, just like other
64x1 vectors.
The problem here is to distinguish vector mask of one DI element and
DI scalar mask. We don't want to lower scalar mask manipulations
because they are simple integer operations, not vector ones. Probably
vector of a single DI should have V1DI mode and not pretend to be a
scalar? This would make things easier.