public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: Bernd Schmidt <bschmidt@redhat.com>,
	 GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)
Date: Fri, 16 Sep 2016 11:36:00 -0000	[thread overview]
Message-ID: <57DBD39B.7030505@foss.arm.com> (raw)
In-Reply-To: <2253d596-ba6f-7d80-b322-b3a03359ff7c@redhat.com>


On 16/09/16 11:45, Bernd Schmidt wrote:
> On 09/16/2016 10:40 AM, Kyrill Tkachov wrote:
>>
>> 2016-09-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>
>>     * simplify-rtx.c (simplify_relational_operation_1): Add transformation
>>     (GTU (PLUS a C) (C - 1)) --> (LTU a -C).
>>
>> 2016-09-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>
>>     * gcc.target/aarch64/gtu_to_ltu_cmp_1.c: New test.
>
> Ok. Don't know if you want to add more variants of the input code to the testcase to make sure they're all covered.
>

Thanks.
I'm having trouble writing testcases for variations of the original testcase as GCC really really wants to convert
everything to a comparison against 1 at RTL level, so only the x == -2 || x == -1 condition seems to trigger this.
However, testcases of the form:
unsigned int
foo (unsigned int a, unsigned int b)
{
   return (a + 10) > 9;
}

seem to trigger it, so I can add some of this form. However, these will be optimised by a match.pd version
of this transformation that I'm working on.

Kyrill

>
> Bernd

  reply	other threads:[~2016-09-16 11:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16  8:50 Kyrill Tkachov
2016-09-16  9:04 ` Richard Biener
2016-09-16  9:40   ` Kyrill Tkachov
2016-09-16 10:02     ` Bin.Cheng
2016-09-16 10:05       ` Kyrill Tkachov
2016-09-16 10:10         ` Bin.Cheng
2016-09-16 10:15           ` Kyrill Tkachov
2016-09-16 10:29             ` Bin.Cheng
2016-09-16 11:02 ` Bernd Schmidt
2016-09-16 11:36   ` Kyrill Tkachov [this message]
2016-09-19 14:47     ` Kyrill Tkachov
2016-09-19 16:26       ` Bernd Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57DBD39B.7030505@foss.arm.com \
    --to=kyrylo.tkachov@foss.arm.com \
    --cc=bschmidt@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).