This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve var_bound range test opt (PR tree-optimization/81655)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Aug 2017 10:09:46 -0600
- Subject: Re: [PATCH] Improve var_bound range test opt (PR tree-optimization/81655)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 32B9A7C84C
- References: <20170803082625.GQ2123@tucnak> <alpine.LSU.2.20.1708031055440.10808@zhemvz.fhfr.qr> <20170803093253.GW2123@tucnak>
On 08/03/2017 03:32 AM, Jakub Jelinek wrote:
> On Thu, Aug 03, 2017 at 10:58:07AM +0200, Richard Biener wrote:
>>> The reason why we punt is the unexpected _4 != 1 condition, the code
>>> is prepared to handle just _4 == 0 (or _4 != 0) where _4 == 0 is equivalent
>>> to _4 != 1 for boolean type.
>>
>> Hmm, I thought we had code to canonicalize boolean compares (but I can't
>> find that right now). Some is in
>
> I was looking for that too, but didn't find anything that would be done
> always.
I can recall looking for that kind of canonicalization as well, but not
finding it. Furthermore instrumentation showed the different forms
could show up in the IL, but forms such as != 1 were relatively rare.
Jeff