This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][combine][RFC] Don't transform sign and zero extends inside mults
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Jeff Law <law at redhat dot com>, Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, gcc Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Nov 2015 08:52:13 +0100
- Subject: Re: [PATCH][combine][RFC] Don't transform sign and zero extends inside mults
- Authentication-results: sourceware.org; auth=none
- References: <56376FFF dot 3070008 at arm dot com> <20151104235015 dot GA13203 at gate dot crashing dot org> <563B4516 dot 5090001 at arm dot com> <20151106005636 dot GA31412 at gate dot crashing dot org> <563CB6DE dot 7070106 at arm dot com> <563D1824 dot 8000607 at redhat dot com> <20151106220008 dot GA19110 at gate dot crashing dot org> <20151108205806 dot GA641 at gate dot crashing dot org>
On Sun, Nov 8, 2015 at 9:58 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Fri, Nov 06, 2015 at 04:00:08PM -0600, Segher Boessenkool wrote:
>> This patch stops combine from generating widening muls of anything else
>> but registers (immediates, memory, ...). This probably is a reasonable
>> tradeoff for all targets, even those (if any) that have such insns.
>>
>> > >I'll let you put it through it's paces on your setup :)
>>
>> > I'll let Segher give the final yes/no on this, but it generally looks
>> > good to me.
>>
>> It looks okay to me too. Testing now, combine patches have the tendency
>> to do unforeseen things on other targets ;-)
>
> Testing shows it makes a difference only very rarely. For many targets
> it makes no difference, for a few it is a small win. For 32-bit x86 it
> creates slightly bigger code.
>
> I think it looks good, but let's wait to hear Uros' opinion.
>From the original patch submission, it looks that this patch would
also benefit x86_32.
Regarding the above code size increase - do you perhaps have a
testcase, to see what causes the difference? It isn't necessary due to
the patch, but perhaps some loads are moved to the insn and aren't
CSE'd anymore.
Uros.