This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386 AVX2] Remove redundant expands.
- From: Richard Henderson <rth at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 16 Oct 2013 10:01:08 -0700
- Subject: Re: [PATCH i386 AVX2] Remove redundant expands.
- Authentication-results: sourceware.org; auth=none
- References: <20131016160621 dot GB22220 at msticlxl57 dot ims dot intel dot com> <CAFULd4YvP_CJbKf+CFky20pQMjDUXbc0GESZZBqSpc3TvXckHA at mail dot gmail dot com>
On 10/16/2013 09:47 AM, Uros Bizjak wrote:
> On Wed, Oct 16, 2013 at 6:06 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>
>> It seems that gang of AVX* patterns were copy and
>> pasted from SSE, however as far as they are NDD,
>> we may remove corresponding expands which sort operands.
>
> OTOH, I have some second thoughts on removing AVX2 expanders.
>
> Please consider the situation, where we have *both* operands in
> memory, and the insn is inside the loop. When reload comes around, it
> will fixup one of the operands with a load from memory. However,
> having insn in the loop, I suspect the load won't be moved out of
> loop.
>
> So, I guess even AVX/AVX2 insn patterns should call
> ix86_fixup_binary_operands_*, and this fixup function should be
> improved to load one of the operands into register, in case both
> operands are in memory.
>
> This also means, that you still need expanders for AVX512 commutative
> multiplies.
>
> Uros.
>
Fair enough.
r~