This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [Aarch64] Optimize subtract in shift counts
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: pinskia at gmail dot com
- Cc: gcc-patches at gcc dot gnu dot org, Michael dot Collison at arm dot com, nd at arm dot com
- Date: Mon, 07 Aug 2017 17:01:59 EDT
- Subject: Re: [PATCH] [Aarch64] Optimize subtract in shift counts
- Authentication-results: sourceware.org; auth=none
- References: <HE1PR0802MB2377266815DA3FBD9F6EF21D95B50@HE1PR0802MB2377.eurprd08.prod.outlook.com> <CA+=Sn1mV0mYmmY63OhvGv3LaP64oUt_vM1wFrTQ957JceG+jTA@mail.gmail.com>
> That is simplify:
> (SHIFT A (32 - B)) -> (SHIFT A (AND (NEG B) 31))
> etc.
I think you need SHIFT_COUNT_TRUNCATED to be true for this to be
valid, but this is exactly what I was getting at in my last message.