public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding
@ 2014-08-26 23:11 josh.m.conner at gmail dot com
  2014-09-01 16:13 ` [Bug target/62275] " ktkachov at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: josh.m.conner at gmail dot com @ 2014-08-26 23:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

            Bug ID: 62275
           Summary: ARM should use vcvta instructions when possible for
                    float -> int rounding
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: josh.m.conner at gmail dot com

Instead of generating a library call for lround/lroundf, the ARM backend should
use vcvta.s32.f64 and vcvta.s32.f32 instructions instead (as long as
-fno-math-errno has been given, since this obviously won't set errno).


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/62275] ARM should use vcvta instructions when possible for float -> int rounding
  2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
@ 2014-09-01 16:13 ` ktkachov at gcc dot gnu.org
  2014-09-02 15:58 ` ktkachov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-09-01 16:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-09-01
                 CC|                            |ktkachov at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |ktkachov at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed, and mine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/62275] ARM should use vcvta instructions when possible for float -> int rounding
  2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
  2014-09-01 16:13 ` [Bug target/62275] " ktkachov at gcc dot gnu.org
@ 2014-09-02 15:58 ` ktkachov at gcc dot gnu.org
  2014-09-02 16:00 ` ktkachov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-09-02 15:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Tue Sep  2 15:57:56 2014
New Revision: 214825

URL: https://gcc.gnu.org/viewcvs?rev=214825&root=gcc&view=rev
Log:
[ARM][1/2] Implement lceil, lfloor, lround optabs with new ARMv8-A
instructions.

      PR target/62275
      * config/arm/iterators.md (FIXUORS): New code iterator.
      (VCVT): New int iterator.
      (su_optab): New code attribute.
      (su): Likewise.
      * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): New pattern.

      PR target/62275
      * gcc.target/arm/lceil-vcvt_1.c: New test.
      * gcc.target/arm/lfloor-vcvt_1.c: Likewise.
      * gcc.target/arm/lround-vcvt_1.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c
    trunk/gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c
    trunk/gcc/testsuite/gcc.target/arm/lround-vcvt_1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/iterators.md
    trunk/gcc/config/arm/vfp.md
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/62275] ARM should use vcvta instructions when possible for float -> int rounding
  2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
  2014-09-01 16:13 ` [Bug target/62275] " ktkachov at gcc dot gnu.org
  2014-09-02 15:58 ` ktkachov at gcc dot gnu.org
@ 2014-09-02 16:00 ` ktkachov at gcc dot gnu.org
  2014-09-02 16:01 ` ktkachov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-09-02 16:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

--- Comment #3 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Tue Sep  2 16:00:01 2014
New Revision: 214826

URL: https://gcc.gnu.org/viewcvs?rev=214826&root=gcc&view=rev
Log:
[2/2] Vectorise lroundf, lfloorf, lceilf using the new ARMv8-A vcvt*
instructions.

    PR target/62275
    * config/arm/neon.md
    (neon_vcvt<NEON_VCVT:nvrint_variant><su_optab><VCVTF:mode>
    <v_cmp_result>): New pattern.
    * config/arm/iterators.md (NEON_VCVT): New int iterator.
    * config/arm/arm_neon_builtins.def (vcvtav2sf, vcvtav4sf, vcvtauv2sf,
    vcvtauv4sf, vcvtpv2sf, vcvtpv4sf, vcvtpuv2sf, vcvtpuv4sf, vcvtmv2sf,
    vcvtmv4sf, vcvtmuv2sf, vcvtmuv4sf): New builtin definitions.
    * config/arm/arm.c (arm_builtin_vectorized_function): Handle
    BUILT_IN_LROUNDF, BUILT_IN_LFLOORF, BUILT_IN_LCEILF.

    PR target/62275
    * gcc.target/arm/vect-lceilf_1.c: New test.
    * gcc.target/arm/vect-lfloorf_1.c: Likewise.
    * gcc.target/arm/vect-lroundf_1.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/arm/vect-lceilf_1.c
    trunk/gcc/testsuite/gcc.target/arm/vect-lfloorf_1.c
    trunk/gcc/testsuite/gcc.target/arm/vect-lroundf_1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.c
    trunk/gcc/config/arm/arm_neon_builtins.def
    trunk/gcc/config/arm/iterators.md
    trunk/gcc/config/arm/neon.md
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/62275] ARM should use vcvta instructions when possible for float -> int rounding
  2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
                   ` (2 preceding siblings ...)
  2014-09-02 16:00 ` ktkachov at gcc dot gnu.org
@ 2014-09-02 16:01 ` ktkachov at gcc dot gnu.org
  2014-09-02 17:23 ` josh.m.conner at gmail dot com
  2014-10-08 15:38 ` yroux at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-09-02 16:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |5.0
         Resolution|---                         |FIXED

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Fixed on trunk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/62275] ARM should use vcvta instructions when possible for float -> int rounding
  2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
                   ` (3 preceding siblings ...)
  2014-09-02 16:01 ` ktkachov at gcc dot gnu.org
@ 2014-09-02 17:23 ` josh.m.conner at gmail dot com
  2014-10-08 15:38 ` yroux at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: josh.m.conner at gmail dot com @ 2014-09-02 17:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

--- Comment #5 from Joshua Conner <josh.m.conner at gmail dot com> ---
Thanks!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/62275] ARM should use vcvta instructions when possible for float -> int rounding
  2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
                   ` (4 preceding siblings ...)
  2014-09-02 17:23 ` josh.m.conner at gmail dot com
@ 2014-10-08 15:38 ` yroux at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: yroux at gcc dot gnu.org @ 2014-10-08 15:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62275

--- Comment #6 from Yvan Roux <yroux at gcc dot gnu.org> ---
Author: yroux
Date: Wed Oct  8 15:37:43 2014
New Revision: 216007

URL: https://gcc.gnu.org/viewcvs?rev=216007&root=gcc&view=rev
Log:
gcc/
2014-10-08  Yvan Roux  <yvan.roux@linaro.org>

    Backport from trunk r214825, r214826.
    2014-09-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    PR target/62275
    * config/arm/neon.md
    (neon_vcvt<NEON_VCVT:nvrint_variant><su_optab><VCVTF:mode>
    <v_cmp_result>): New pattern.
    * config/arm/iterators.md (NEON_VCVT): New int iterator.
    * config/arm/arm_neon_builtins.def (vcvtav2sf, vcvtav4sf, vcvtauv2sf,
    vcvtauv4sf, vcvtpv2sf, vcvtpv4sf, vcvtpuv2sf, vcvtpuv4sf, vcvtmv2sf,
    vcvtmv4sf, vcvtmuv2sf, vcvtmuv4sf): New builtin definitions.
    * config/arm/arm.c (arm_builtin_vectorized_function): Handle
    BUILT_IN_LROUNDF, BUILT_IN_LFLOORF, BUILT_IN_LCEILF.

    2014-09-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    PR target/62275
    * config/arm/iterators.md (FIXUORS): New code iterator.
    (VCVT): New int iterator.
    (su_optab): New code attribute.
    (su): Likewise.
    * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): New pattern.

gcc/testsuite/
2014-10-08  Yvan Roux  <yvan.roux@linaro.org>

    Backport from trunk r214825, r214826, r215085.
    2014-09-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    * gcc.target/arm/vect-lceilf_1.c: Make input and output arrays global
    and 16-byte aligned.
    * gcc.target/arm/vect-lfloorf_1.c: Likewise.
    * gcc.target/arm/vect-lroundf_1.c: Likewise.
    * gcc.target/arm/vect-rounding-btruncf.c: Likewise.
    * gcc.target/arm/vect-rounding-ceilf.c: Likewise.
    * gcc.target/arm/vect-rounding-floorf.c: Likewise.
    * gcc.target/arm/vect-rounding-roundf.c: Likewise.

    2014-09-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    PR target/62275
    * gcc.target/arm/vect-lceilf_1.c: New test.
    * gcc.target/arm/vect-lfloorf_1.c: Likewise.
    * gcc.target/arm/vect-lroundf_1.c: Likewise.

    2014-09-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    PR target/62275
    * gcc.target/arm/lceil-vcvt_1.c: New test.
    * gcc.target/arm/lfloor-vcvt_1.c: Likewise.
    * gcc.target/arm/lround-vcvt_1.c: Likewise.


Added:
    branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c
    branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c
    branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/lround-vcvt_1.c
    branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-lceilf_1.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-lfloorf_1.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-lroundf_1.c
Modified:
    branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
    branches/linaro/gcc-4_9-branch/gcc/config/arm/arm.c
    branches/linaro/gcc-4_9-branch/gcc/config/arm/arm_neon_builtins.def
    branches/linaro/gcc-4_9-branch/gcc/config/arm/iterators.md
    branches/linaro/gcc-4_9-branch/gcc/config/arm/neon.md
    branches/linaro/gcc-4_9-branch/gcc/config/arm/vfp.md
    branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-08 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-26 23:11 [Bug target/62275] New: ARM should use vcvta instructions when possible for float -> int rounding josh.m.conner at gmail dot com
2014-09-01 16:13 ` [Bug target/62275] " ktkachov at gcc dot gnu.org
2014-09-02 15:58 ` ktkachov at gcc dot gnu.org
2014-09-02 16:00 ` ktkachov at gcc dot gnu.org
2014-09-02 16:01 ` ktkachov at gcc dot gnu.org
2014-09-02 17:23 ` josh.m.conner at gmail dot com
2014-10-08 15:38 ` yroux at gcc dot gnu.org

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).