match.pd: Support combine cond_len_op + vec_cond similar to cond_op
This patch adds combine cond_len_op and vec_cond to cond_len_op like
cond_op.
Consider this code (RISC-V target):
void
foo (uint8_t *__restrict x, uint8_t *__restrict y, uint8_t *__restrict z,
uint8_t *__restrict pred, uint8_t *__restrict merged, int n)
{
for (int i = 0; i < n; ++i)
x[i] = pred[i] != 1 ? y[i] / z[i] : merged[i];
}
Before this patch:
...
vect_iftmp.18_71 = .COND_LEN_DIV (mask__31.11_61, vect__5.14_65, vect__7.17_69, { 0, ... }, _86, 0);
vect_iftmp.23_78 = .VCOND_MASK (mask__31.11_61, vect_iftmp.18_71, vect_iftmp.22_77);
...
After this patch:
...
_30 = .COND_LEN_DIV (mask__31.16_61, vect__5.19_65, vect__7.22_69, vect_iftmp.27_77, _85, 0);
...
gcc/ChangeLog:
* gimple-match.h (gimple_match_op::gimple_match_op):
Add interfaces for more arguments.
(gimple_match_op::set_op): Add interfaces for more arguments.
* match.pd: Add support of combining cond_len_op + vec_cond