Vectorise multiply high with scaling operations (PR 89386)

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 12 September 2019 09:59 EDT

2019-09-12 Yuliang Wang

gcc/ PR tree-optimization/89386
- config/aarch64/aarch64-sve2.md (mull) (shrnb, shrnt): New SVE2 patterns. (mulhs3): New pattern for MULHRS.
- config/aarch64/iterators.md (UNSPEC_SMULLB, UNSPEC_SMULLT) (UNSPEC_UMULLB, UNSPEC_UMULLT, UNSPEC_SHRNB, UNSPEC_SHRNT) (UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SMULHS, UNSPEC_SMULHRS) UNSPEC_UMULHS, UNSPEC_UMULHRS): New unspecs. (MULLBT, SHRNB, SHRNT, MULHRS): New int iterators. (su, r): Handle the unspecs above. (bt): New int attribute.
- internal-fn.def (IFN_MULHS, IFN_MULHRS): New internal functions.
- internal-fn.c (first_commutative_argument): Commutativity info for above.
- optabs.def (smulhs_optab, smulhrs_optab, umulhs_optab) (umulhrs_optab): New optabs.
- doc/md.texi (smulhs$var{m3}, umulhs$var{m3}) (smulhrs$var{m3}, umulhrs$var{m3}): Documentation for the above.
- tree-vect-patterns.c (vect_recog_mulhs_pattern): New pattern function. (vect_vect_recog_func_ptrs): Add it.
- testsuite/gcc.target/aarch64/sve2/mulhrs_1.c: New test.
- testsuite/gcc.dg/vect/vect-mulhrs-1.c: As above.
- testsuite/gcc.dg/vect/vect-mulhrs-2.c: As above.
- testsuite/gcc.dg/vect/vect-mulhrs-3.c: As above.
- testsuite/gcc.dg/vect/vect-mulhrs-4.c: As above.
- doc/sourcebuild.texi (vect_mulhrs_hi): Document new target selector.
- testsuite/lib/target-supports.exp (check_effective_target_vect_mulhrs_hi): Return true for AArch64 with SVE2.

514ffb4c006 Vectorise multiply high with scaling operations (PR 89386)
gcc/ChangeLog | 33 +++++
gcc/config/aarch64/aarch64-sve2.md | 60 ++++++++
gcc/config/aarch64/iterators.md | 35 ++++-
gcc/doc/md.texi | 27 ++++
gcc/doc/sourcebuild.texi | 4 +
gcc/internal-fn.c | 2 +
gcc/internal-fn.def | 5 +
gcc/optabs.def | 4 +
gcc/testsuite/gcc.dg/vect/vect-mulhrs-1.c | 49 +++++++
gcc/testsuite/gcc.dg/vect/vect-mulhrs-2.c | 9 ++
gcc/testsuite/gcc.dg/vect/vect-mulhrs-3.c | 9 ++
gcc/testsuite/gcc.dg/vect/vect-mulhrs-4.c | 10 ++
gcc/testsuite/gcc.target/aarch64/sve2/mulhrs_1.c | 63 +++++++++
gcc/testsuite/lib/target-supports.exp | 9 ++
gcc/tree-vect-patterns.c | 170 +++++++++++++++++++++++
15 files changed, 488 insertions(+), 1 deletion(-)

Upstream: gcc.gnu.org


  • Share