Indeed. I don't remember my exact comments during the talk at the
Cauldron but the scheme used there was sth like
mask = GEN_MASK <vec1 < vec2>; b = a + 1; x = VEC_COND <mask, a, b>
to model conditional execution already at the if-conversion stage
(for all scalar stmts made executed unconditionally rather than just
the PHI results). I was asking for the condition to be removed from
GEN_MASK (patch 1 has this fixed now AFAICS). And I also asked why
it was necessary to do this "lowering" here and not simply do
mask = vec1 < vec2; // regular vector mask! b = a + 1; x = VEC_COND
<mask, a, b>
and have the lowering to an integer mask done later. You'd still
change if-conversion to predicate _all_ statements, not just those
with side-effects. So I think there still needs to be a new target
hook to trigger this, similar to how the target capabilities trigger
the masked load/store path in if-conversion.
But I don't like changing our IL so much as to allow 'integer' masks
everywhere.