This is the mail archive of the
mailing list for the GCC project.
RE: [PATCH] Reassociate X == CST1 || X == CST2 if popcount (CST2 - CST1) == 1 into ((X - CST1) & ~(CST2 - CST1)) == 0
- From: "Zhenqiang Chen" <zhenqiang dot chen at arm dot com>
- To: "'Jeff Law'" <law at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Oct 2013 10:11:38 +0800
- Subject: RE: [PATCH] Reassociate X == CST1 || X == CST2 if popcount (CST2 - CST1) == 1 into ((X - CST1) & ~(CST2 - CST1)) == 0
- Authentication-results: sourceware.org; auth=none
- References: <000001ce91b3$0a947cc0$1fbd7640$ at arm dot com> <52561947 dot 90600 at redhat dot com> <000001cec59a$99f2ba60$cdd82f20$ at arm dot com> <52578A7B dot 8040206 at redhat dot com>
> -----Original Message-----
> From: Jeff Law [mailto:firstname.lastname@example.org]
> Sent: Friday, October 11, 2013 1:20 PM
> To: Zhenqiang Chen
> Cc: email@example.com
> Subject: Re: [PATCH] Reassociate X == CST1 || X == CST2 if popcount (CST2
> CST1) == 1 into ((X - CST1) & ~(CST2 - CST1)) == 0
> On 10/10/13 03:25, Zhenqiang Chen wrote:
> > It comes from Coremark. The code is:
> > if (NEXT_SYMBOL == '+' || NEXT_SYMBOL == '-')
> I should have guessed ;-)
> > For ARM, there are three instructions rather than 4 (in thumb state).
> > For some older gcc, I got performance improvement on ARM chromebook.
> > But I can not reproduce the performance gain now.
> > I will collect logs during GCC bootstrap.
> Thanks. It doesn't have to be anything particularly complex. When I'm
> looking at a transformation I usually just put a printf when it triggers
> for the string in a make log.
Thanks. I check the make log. There are 1906 occurrences.
> Depending on what I'm doing, I may dig more deeply into the situations
> where its triggering to make sure I fully understand the primary and
> secondary effects of a transformation which often leads to tweaking the
> implementation. I don't think that level of rigor is needed here.