public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@vnet.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: David Edelsohn <dje.gcc@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	       "William J. Schmidt" <wschmidt@linux.vnet.ibm.com>,
	       Will Schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH, rs6000] Fix PR83926, ICE using __builtin_vsx_{div,udiv,mul}_2di builtins
Date: Tue, 06 Feb 2018 19:55:00 -0000	[thread overview]
Message-ID: <e9c63416-1f0c-ed44-cde0-d91f3e6a8c9a@vnet.ibm.com> (raw)
In-Reply-To: <20180206173951.GC21977@gate.crashing.org>

On 2/6/18 11:39 AM, Segher Boessenkool wrote:
> Yes, if you make [u]divdi3 work for SDI (i.e. also for -m32) we'll never
> have to special-case it again (also [u]moddi3?)

Maybe, but there are no explicit calls to those, so I left them
as is, since if we touch those, then we probably need to look at
almost all logical/arithmetic patterns...and that is a lot of work
not needed to fix this specific issue.


> Yes, if you make [u]divdi3 work for SDI (i.e. also for -m32) we'll never
> have to special-case it again (also [u]moddi3?)

Heh, looking at "mod<mode>3", I see it calls gen_div<mode>3(), but since
there are no explicit calls to gen_moddi3(), we don't really have a problem.


> But this then also will be used by expand, when generation a DImode
> divide.  Does it generate code at least as good as what the generic code
> generates?  It probably will, but check please.

The change from GPR to SDI iterator and my change to explicitly call
the __divdi3() lib function for DImode divides ends up generating the
exact same code generated for the following test case that we get with
the non patched compiler:

  long long
  foo (long long a, long long b)
  {
    return a / b;
  }

Peter

  reply	other threads:[~2018-02-06 19:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06  1:32 David Edelsohn
2018-02-06  2:43 ` Peter Bergner
2018-02-06  4:48   ` David Edelsohn
2018-02-06 12:42     ` Peter Bergner
2018-02-06 13:21       ` Segher Boessenkool
2018-02-06 15:43       ` Peter Bergner
2018-02-06 16:20         ` David Edelsohn
2018-02-06 16:36           ` Peter Bergner
2018-02-06 17:40             ` Segher Boessenkool
2018-02-06 19:55               ` Peter Bergner [this message]
2018-02-08 16:38             ` Peter Bergner
2018-02-08 18:28               ` Peter Bergner
2018-02-09 16:51                 ` Segher Boessenkool
2018-02-09 17:09                   ` Peter Bergner
2018-02-09 16:17               ` Segher Boessenkool
2018-02-09 16:39                 ` Peter Bergner
  -- strict thread matches above, loose matches on Subject: below --
2018-02-06  0:07 Peter Bergner

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=e9c63416-1f0c-ed44-cde0-d91f3e6a8c9a@vnet.ibm.com \
    --to=bergner@vnet.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=will_schmidt@vnet.ibm.com \
    --cc=wschmidt@linux.vnet.ibm.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).