This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Avoid 512-bit vector return constant for Intel AVX512 configuration
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "Shalnov, Sergey" <sergey dot shalnov at intel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "kirill dot yukhin at gmail dot com" <kirill dot yukhin at gmail dot com>, "Senkevich, Andrew" <andrew dot senkevich at intel dot com>, "Ivchenko, Alexander" <alexander dot ivchenko at intel dot com>, "Peryt, Sebastian" <sebastian dot peryt at intel dot com>
- Date: Thu, 28 Sep 2017 20:12:13 +0200
- Subject: Re: [PATCH, i386] Avoid 512-bit vector return constant for Intel AVX512 configuration
- Authentication-results: sourceware.org; auth=none
- References: <71475DE127B5E94A8E189586234C08881227583A@irsmsx105.ger.corp.intel.com> <CAFULd4atebVPE2-_gJd-wwjjnqxEVjrA25aF_X3gDccMze5B2A@mail.gmail.com> <71475DE127B5E94A8E189586234C0888122758AC@irsmsx105.ger.corp.intel.com>
On Thu, Sep 28, 2017 at 4:05 PM, Shalnov, Sergey
<sergey.shalnov@intel.com> wrote:
> Sorry. The patch is changed as you proposed.
OK for mainline and committed.
Thanks,
Uros.
> -----Original Message-----
> From: Uros Bizjak [mailto:ubizjak@gmail.com]
> Sent: Thursday, September 28, 2017 3:17 PM
> To: Shalnov, Sergey <sergey.shalnov@intel.com>
> Cc: gcc-patches@gcc.gnu.org; kirill.yukhin@gmail.com; Senkevich, Andrew <andrew.senkevich@intel.com>; Ivchenko, Alexander <alexander.ivchenko@intel.com>; Peryt, Sebastian <sebastian.peryt@intel.com>
> Subject: Re: [PATCH, i386] Avoid 512-bit vector return constant for Intel AVX512 configuration
>
> On Thu, Sep 28, 2017 at 3:08 PM, Shalnov, Sergey <sergey.shalnov@intel.com> wrote:
>> Hi,
>> GCC uses full 512-bit register to return the constant from the function.
>> The patch avoid 512-bit register usage if "-mprefer-avx256" option used.
>>
>> 2017-09-28 Sergey Shalnov <Sergey.Shalnov@intel.com>
>>
>> gcc/
>> * config/i386/i386.md(*movsf_internal, *movdf_internal):
>> Return 256-bit AVX modes for TARGET_PREFER_AVX256.
>>
>> gcc/testsuite/
>> * gcc.target/i386/avx512f-constant-float-return.c: New test.
>>
>
> - (match_test "TARGET_AVX512F")
> + (match_test "TARGET_AVX512F && !TARGET_PREFER_AVX256")
>
> Please use
>
> (and (match_test "TARGET_AVX512F)
> (not (match_test "TARGET_PREFER_AVX256)))
>
> Uros.