From: Jeff Law <law@redhat.com>
To: "Bin.Cheng" <amker.cheng@gmail.com>,
Richard Biener <richard.guenther@gmail.com>
Cc: Bin Cheng <bin.cheng@arm.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH GCC]Improve bound information in loop niter analysis
Date: Tue, 18 Aug 2015 18:38:00 -0000 [thread overview]
Message-ID: <55D37601.6060200@redhat.com> (raw)
In-Reply-To: <CAHFci29KkT64t-aAkhCPdFippjn1Rgg9E+Xp_ETFU0C8ihB90A@mail.gmail.com>
On 08/17/2015 04:01 AM, Bin.Cheng wrote:
>>
>> + c0 = fold_convert (type, c0);
>> + c1 = fold_convert (type, c1);
>> +
>> + if (operand_equal_p (var, c0, 0))
>>
>> I believe if c0 is not already of type type operand-equal_p will never succeed.
> It's quite specific case targeting comparison between var and it's
> range bounds. Given c0 is in form of "var + offc0", then the
> comparison "var + offc0 != range bounds" doesn't have any useful
> information. Maybe useless type conversion can be handled here
> though, it might be even corner case.
My comment about useless type conversions was more about a deficiency in
operand_equal_p's implementation. It wasn't something I felt needed to
be addressed in your patch.
I think using operand_equal_p is fine here.
Jeff
next prev parent reply other threads:[~2015-08-18 18:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 10:11 Bin Cheng
2015-08-13 8:27 ` Bin.Cheng
2015-08-13 22:10 ` Jeff Law
2015-08-14 3:13 ` Bin.Cheng
2015-08-14 18:32 ` Jeff Law
2015-08-14 8:28 ` Richard Biener
2015-08-14 18:47 ` Jeff Law
2015-08-17 10:06 ` Bin.Cheng
2015-08-17 11:16 ` Ajit Kumar Agarwal
2015-08-17 11:38 ` Ajit Kumar Agarwal
2015-08-18 7:53 ` Bin.Cheng
2015-08-18 8:16 ` Ajit Kumar Agarwal
2015-08-18 8:51 ` Richard Biener
2015-08-18 9:09 ` Bin.Cheng
2015-08-18 18:38 ` Jeff Law [this message]
2015-08-19 2:45 ` Bin.Cheng
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=55D37601.6060200@redhat.com \
--to=law@redhat.com \
--cc=amker.cheng@gmail.com \
--cc=bin.cheng@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/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).