This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/86541] Use SSE to emulate __attribute__((vector_size(8)))


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86541

--- Comment #2 from Richard Henderson <rth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Given that we have a target pass that makes use of SSE regs for scalar
> operations I wonder if it would make more sense to attack this at the
> target level by claiming native support for vector_size(8) and using
> a target pass to make that work.  As you said the most simple way is to
> movlhps %xmmN, %xmmN at strategic places.  That very thing could be
> also done by tree-vect-generic.c of course.

I was really thinking to support V8QImode et al in the md file.

Consider e.g. mulv16qi3, for which there is no 8-bit multiply
support in the ISA.  We expand to 2 unpacks, 2 mulv8qi3,
2 zero-extend, 1 repack.  By expanding mulv8qi3 in the backend,
we can halve the amount of work.

However, if we "lower" at the generic level, we'll not be able
to see that half of the V16QImode expansion is dead, and wind
up doing twice as much work as necessary.

However, I can also see the value in not replicating *all* of
those patterns in the backend, for a feature of limited use.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]