]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Implement widen_smul_*_v4si for plain sse2
authorRichard Henderson <rth@redhat.com>
Wed, 27 Jun 2012 03:19:59 +0000 (20:19 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 27 Jun 2012 03:19:59 +0000 (20:19 -0700)
commit87b78516208e45cacb666e5ce824417438456911
treec32f4f08cef41f1957937a62285a27cfb98e62e4
parent298301d9e7ef43ab3475495446c9d9378cf6fb31
i386: Implement widen_smul_*_v4si for plain sse2

If we don't implement this pattern, the vectorizer is happy to
unpack the v4si and use the full mulv2di3.  This results in
more element shuffling than is required.

        * config/i386/i386.c (bdesc_args): Update.  Change
        IX86_BUILTIN_VEC_WIDEN_SMUL_ODD_V4SI to OPTION_MASK_ISA_SSE2.
        (IX86_BUILTIN_VEC_WIDEN_SMUL_EVEN_V4SI): New.
        (ix86_builtin_mul_widen_even): Use it.
        (ix86_builtin_mul_widen_odd): Relax SMUL_ODD from sse4 to sse2.
        (ix86_expand_mul_widen_evenodd): Handle signed for sse2.
        * config/i386/sse.md (vec_widen_<s>mult_hi_<V124_AVX2>): Allow
        for all SSE2.
        (vec_widen_<s>mult_lo_<V124_AVX2>): Likewise.
        (vec_widen_<s>mult_odd_<VI4_AVX2>): Likewise.  Relax from V124_AVX2.
        (vec_widen_smult_even_v4si): New.

From-SVN: r189006
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/sse.md