The following fixes the logic in multi-step mask conversions with
respect to the case where we need to resort to the sbool variant
of the unpack optabs. We were testing a wrong condition on when
that would apply in the multi-step case.
PR tree-optimization/122723
* tree-vect-stmts.cc (supportable_widening_operation):
Correct optab to query in the multi-step case when it is
supposed to hit the sbool case.
TYPE_UNSIGNED (prev_type));
if (VECTOR_BOOLEAN_TYPE_P (intermediate_type)
- && VECTOR_BOOLEAN_TYPE_P (prev_type)
- && intermediate_mode == prev_mode
- && SCALAR_INT_MODE_P (prev_mode))
+ && VECTOR_BOOLEAN_TYPE_P (wide_vectype)
+ && intermediate_mode == TYPE_MODE (wide_vectype)
+ && SCALAR_INT_MODE_P (intermediate_mode))
{
/* If the input and result modes are the same, a different optab
is needed where we pass in the number of units in vectype. */