public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Hurugalawadi, Naveen" <Naveen.Hurugalawadi@caviumnetworks.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"marc.glisse@inria.fr" <marc.glisse@inria.fr>
Subject: Re: Move some flag_unsafe_math_optimizations using simplify and match
Date: Wed, 19 Aug 2015 06:47:00 -0000	[thread overview]
Message-ID: <SN2PR0701MB1024A460F6FA7BC0FB386A588E670@SN2PR0701MB1024.namprd07.prod.outlook.com> (raw)
In-Reply-To: <CAFiYyc1xhkUsnmaGeLg-8iufxWpgXSjgP_izamcX0bvm9KRRNQ@mail.gmail.com>

Hi Richard,

Thanks very much for your review and comments.

>> Can you point me to which patterns exhibit this behavior?  

root(x)*root(y) as root(x*y)
expN(x)*expN(y) as expN(x+y)
pow(x,y)*pow(x,z) as pow(x,y+z)
x/expN(y) into x*expN(-y)

Long Double and Float variants FAIL with segmentation fault with these
patterns in match.pd file for AArch64.
However, most of these work as expected with X86_64.

I had those implemented as per the fold-const.c which can be found at:-
https://gcc.gnu.org/ml/gcc/2015-08/msg00021.html

>>  (mult (SQRT@1 @0) @1)

Sorry for the typo in there.
However, the current pattern does not generate the optimized pattern as expected.
x_2 = ABS_EXPR <x_1(D)>;
return x_2;

>> use (rdiv (POW @0 REAL_CST@1) @0)

It generates ICE with the above modification
internal compiler error: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1259

Also, can you please explain me the significance and use of ":s"
I could understand it a bit but still confused about its use in match.pd

Thanks,
Naveen

  reply	other threads:[~2015-08-19  4:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  5:29 Hurugalawadi, Naveen
2015-08-18 10:24 ` Richard Biener
2015-08-19  6:47   ` Hurugalawadi, Naveen [this message]
2015-08-19 10:06     ` Richard Biener
2015-08-20  5:38       ` Hurugalawadi, Naveen
2015-08-20  6:20         ` Marc Glisse
2015-08-20  8:22           ` Richard Biener
2015-08-20  9:18             ` Marc Glisse
2015-08-20  8:17         ` Richard Biener
2015-08-20  9:24           ` Hurugalawadi, Naveen
2015-08-20 11:00             ` Richard Biener
2015-08-21  8:51               ` Richard Biener

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=SN2PR0701MB1024A460F6FA7BC0FB386A588E670@SN2PR0701MB1024.namprd07.prod.outlook.com \
    --to=naveen.hurugalawadi@caviumnetworks.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marc.glisse@inria.fr \
    --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).