public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Andrew Stubbs <andrew_stubbs@mentor.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: RTL alternative selection question
Date: Mon, 23 Sep 2019 14:15:00 -0000	[thread overview]
Message-ID: <20190923141517.GH9749@gate.crashing.org> (raw)
In-Reply-To: <1a7febb4-197e-eca7-4fcf-99bf5cb8bdf6@mentor.com>

On Mon, Sep 23, 2019 at 11:56:27AM +0100, Andrew Stubbs wrote:
>   [(set (match_operand:DI 0 "register_operand"  "=Sg,v")
>         (ashift:DI
>           (match_operand:DI 1 "gcn_alu_operand" " Sg,v")
>           (match_operand:SI 2 "gcn_alu_operand" " Sg,v")))
>    (clobber (match_scratch:BI 3                 "=cs,X"))]

> Unfortunately, the compiler (almost?) exclusively selects the second 
> alternative, even when this means moving the values from one register 
> file to the other, and then back again.
> 
> The problem is that the scalar instruction clobbers the CC register, 
> which results in a "reject++" for that alternative in the LRA dump.

What kind of reject?  It prints a reason, too.

Maybe we should make a macro/hook to never do that for your target, for
those flags registers anyway.


Segher

  parent reply	other threads:[~2019-09-23 14:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 10:56 Andrew Stubbs
2019-09-23 13:23 ` Richard Biener
2019-09-23 14:15 ` Segher Boessenkool [this message]
2019-09-23 14:39   ` Andrew Stubbs
2019-09-23 15:21     ` Segher Boessenkool
2019-09-23 15:26       ` Andrew Stubbs
2019-09-23 16:24         ` Jeff Law
2019-09-23 19:14     ` Richard Sandiford
2019-10-01 12:12     ` Andrew Stubbs
2019-10-02  0:07       ` Segher Boessenkool

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=20190923141517.GH9749@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=andrew_stubbs@mentor.com \
    --cc=gcc@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).