Hi Richard, >- if (nunits < 1) /* Support V1SI. */ >+ if (nunits < 1 || (nunits == 1 && !reduct_p)) > return NULL_TREE; > >doesn't seem to be against trunk which has > > if (nunits <= 1) > return NULL_TREE; > >so what happens if you just change that to > > if (nunits < 1) > return NULL_TREE;
Ah, that's what I first tried, and mistakenly sent the patch against that. That did help the initial problem, but then I needed to add a lot of support for the V1SI type in the backend (which just duplicated SI patterns) and there are a few places where GCC seems to have sanity checks against vectors that are only one element wide. A dot product producing a scalar result seems natural. Also, as well as ARC benefitting from this, I think the TI c6x port would too. That currently has a sdot_prodv2hi pattern that uses SI and V2HI types. Cheers, Jon