public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@arm.com>
To: Bernd Schmidt <bschmidt@redhat.com>,
	 GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68506: Fix emitting order of insns in IF-THEN-JOIN case
Date: Thu, 26 Nov 2015 14:00:00 -0000	[thread overview]
Message-ID: <56570EAA.1070808@arm.com> (raw)
In-Reply-To: <56570BDB.9070804@redhat.com>


On 26/11/15 13:40, Bernd Schmidt wrote:
> On 11/26/2015 12:12 PM, Kyrill Tkachov wrote:
>> diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
>> index af7a3b9..3e3dc8d 100644
>> --- a/gcc/ifcvt.c
>> +++ b/gcc/ifcvt.c
>> @@ -2220,7 +2220,7 @@ noce_try_cmove_arith (struct noce_if_info *if_info)
>>         }
>>
>>       }
>> -    if (emit_a && modified_in_a)
>> +    if (emit_a || modified_in_a)
>>         {
> Having stared at it in the debugger for a while, I think I managed to convince myself that this is correct. So, OK.
>

Thanks.

> A few other comments. This whole if block is indented too far, please fix while you're there. Also eliminate the unnecessary blank lines before closing braces (two instances inside this if block). There are other formatting errors in this 
> function, but those are best left alone for now.

Ok, I'll fix the indentation in that if-else block

>
>>       modified_in_b = emit_b != NULL_RTX && modified_in_p (orig_a, emit_b);
>
> Can this ever be true? We arrange for emit_b to set a new pseudo, don't we? Are we allowing cases where we copy a pattern that sets more than one register, and is that safe?
>

You're right, this statement always sets modifieb_in_b to false. We reject anything bug single_set insns
by this point in the code. I'll replace that with modified_in_b = false;

Thanks,
Kyrill
>
> Bernd
>

  reply	other threads:[~2015-11-26 13:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 11:15 Kyrill Tkachov
2015-11-26 13:50 ` Bernd Schmidt
2015-11-26 14:00   ` Kyrill Tkachov [this message]
2015-11-26 14:27     ` Bernd Schmidt
2015-11-26 14:35       ` Kyrill Tkachov
2015-11-26 14:37         ` Bernd Schmidt
2015-11-26 16:49         ` Kyrill Tkachov
2015-11-26 16:51           ` Bernd Schmidt
2015-11-26 17:05             ` Kyrill Tkachov
2015-11-27  9:45               ` Kyrill Tkachov
2015-11-27 14:09                 ` Richard Biener
2015-11-27 14:35                   ` Kyrill Tkachov
2015-11-27 14:38                     ` Bernd Schmidt
2015-11-27 14:41                       ` Kyrill Tkachov

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=56570EAA.1070808@arm.com \
    --to=kyrylo.tkachov@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).