i386: Introduce mulv2si3 instruction
commit919642fa4b2bc4c32910336dd200d53766801c80
authorUros Bizjak <ubizjak@gmail.com>
Fri, 5 May 2023 12:10:18 +0000 (5 14:10 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Fri, 5 May 2023 12:11:15 +0000 (5 14:11 +0200)
treed763d913fa98edebe48cd4e4d8c4ae3e6ebc786c
parente383fc69d2a3eab37319ea41543ee09c8cdd6e57
i386: Introduce mulv2si3 instruction

For SSE2 targets the expander unpacks input elements into the correct
position in the V4SI vector and emits PMULUDQ instruction.  The output
elements are then shuffled back to their positions in the V2SI vector.

For SSE4 targets PMULLD instruction is emitted directly.

gcc/ChangeLog:

* config/i386/mmx.md (mulv2si3): New expander.
(*mulv2si3): New insn pattern.

gcc/testsuite/ChangeLog:

* gcc.target/i386/sse2-mmx-mult-vec.c: New test.
gcc/config/i386/mmx.md
gcc/testsuite/gcc.target/i386/sse2-mmx-mult-vec.c [new file with mode: 0644]