On Tue, Nov 19, 2019 at 12:58:19PM +0000, Richard Sandiford wrote:
> Jakub Jelinek <[email protected]> writes:
> > This patch restores the previous behavior, there could be many reasons why
> > TYPE_MODE is BLKmode or some integral mode instead of a vector mode,
> > unsupported vector mode, lack of available registers etc.
>
> Fow the record, I think the assert was valid and I'd have preferred it
> if we'd fixed the targets so that they don't return bogus modes for
> preferred_simd_mode. After all, it's the targets that decide which
> vector modes are supported and what can go in registers.
>
> So IMO the assert simply exposed a genuine target bug. I don't strongly
> object though.
I don't object if it is fixed in the targets, I just don't think
omp_clause_aligned_alignment is the place where such target bugs should be
diagnosed. If we want to enforce it, we should enforce it in some self-test
(though, that wouldn't cover all possible ISA combinations), or in some
checking function somewhere where it is always triggered.
The vectorizer apparently doesn't enforce that.
Jakub