[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

Uroš Bizjak  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Uroš Bizjak  ---
Fixed.

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

--- Comment #6 from uros at gcc dot gnu.org ---
Author: uros
Date: Mon Jun 17 18:40:22 2019
New Revision: 272396

URL: https://gcc.gnu.org/viewcvs?rev=272396=gcc=rev
Log:
PR target/62055
* config/i386/i386.md (*nabstf2_1): New insn pattern.
(*nabs2_1): Ditto.
(nabs sse-reg splitter): New splitter.
* config/i386/sse.md (*nabs2): New insn_and_split pattern.

testsuite/ChangeLog:

PR target/62055
* gcc.target/i386/fnabs.c: New test.


Added:
trunk/gcc/testsuite/gcc.target/i386/fnabs.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.md
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com
   Target Milestone|--- |10.0

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

Uroš Bizjak  changed:

   What|Removed |Added

  Attachment #46464|0   |1
is obsolete||

--- Comment #5 from Uroš Bizjak  ---
Created attachment 46492
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46492=edit
Proposed patch

Patch in testing.

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

--- Comment #4 from Marc Glisse  ---
(In reply to Uroš Bizjak from comment #3)
> The patch is OK, but please let me cleanup this (and scalar) part a bit
> first.

Of course, thanks. And you are more than welcome to take over if you feel like
it ;-)

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

--- Comment #3 from Uroš Bizjak  ---
(In reply to Marc Glisse from comment #2)
> Created attachment 46464 [details]
> for vectors
> 
> A naive try to handle it for vectors (because it seems a bit easier),
> copying the existing pattern for neg or abs. On a trivial testcase, it seems
> to work, but I don't really understand how the "use" part works, and in
> particular if it is safe to assume that it is always the constant I expect.

The patch is OK, but please let me cleanup this (and scalar) part a bit first.

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2019-06-08 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

--- Comment #2 from Marc Glisse  ---
Created attachment 46464
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46464=edit
for vectors

A naive try to handle it for vectors (because it seems a bit easier), copying
the existing pattern for neg or abs. On a trivial testcase, it seems to work,
but I don't really understand how the "use" part works, and in particular if it
is safe to assume that it is always the constant I expect.

[Bug target/62055] missed optimization: recognize fnabs (FP negative absolute value) (x86-64)

2014-08-08 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62055

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-08
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed also with -ffast-math.