public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/88836] [SVE] Redundant PTEST in loop test
       [not found] <bug-88836-4@http.gcc.gnu.org/bugzilla/>
@ 2020-08-11 14:25 ` mkuvyrkov at gcc dot gnu.org
  2020-08-11 16:28 ` rsandifo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2020-08-11 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mkuvyrkov at gcc dot gnu.org

--- Comment #3 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
Hi Richard,
Hi Kyrill,

Does Kugan's patch tentatively look good?

If it does, we'll pick it up, retest, fix/improve if necessary and submit for
review.

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

* [Bug target/88836] [SVE] Redundant PTEST in loop test
       [not found] <bug-88836-4@http.gcc.gnu.org/bugzilla/>
  2020-08-11 14:25 ` [Bug target/88836] [SVE] Redundant PTEST in loop test mkuvyrkov at gcc dot gnu.org
@ 2020-08-11 16:28 ` rsandifo at gcc dot gnu.org
  2021-01-15 16:46 ` cvs-commit at gcc dot gnu.org
  2021-01-15 17:06 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-08-11 16:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
My preferred fix for this is now to finish off the secondary
(and ill-fated :-)) combine pass I posted at:

    https://gcc.gnu.org/pipermail/gcc-patches/2019-November/534728.html

I've been doing this on a spare-time basis since then and hope
to have something to post in time for the end of stage 1.

That approach is more general in that it also fixes some missed
optimisations in the handling of the first-faulting load ACLE intrinsics.

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

* [Bug target/88836] [SVE] Redundant PTEST in loop test
       [not found] <bug-88836-4@http.gcc.gnu.org/bugzilla/>
  2020-08-11 14:25 ` [Bug target/88836] [SVE] Redundant PTEST in loop test mkuvyrkov at gcc dot gnu.org
  2020-08-11 16:28 ` rsandifo at gcc dot gnu.org
@ 2021-01-15 16:46 ` cvs-commit at gcc dot gnu.org
  2021-01-15 17:06 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-15 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:5a783f42d77b2f00a1ed171c119b020e8df8e521

commit r11-6723-g5a783f42d77b2f00a1ed171c119b020e8df8e521
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Jan 15 16:45:42 2021 +0000

    aarch64: Add a minipass for fusing CC insns [PR88836]

    This patch adds a small target-specific pass to remove redundant SVE
    PTEST instructions.  There are two important uses of this:

    - Removing PTESTs after WHILELOs (PR88836).  The original testcase
      no longer exhibits the problem due to more recent optimisations,
      but it can still be seen in simple cases like the one in the patch.
      It also shows up in 450.soplex.

    - Removing PTESTs after RDFFRs in ACLE code.

    This is just an interim âsolutionâ for GCC 11.  I hope to replace
    it with something generic and target-independent for GCC 12.
    However, the use cases above are very important for performance,
    so I'd rather not leave the bug unfixed for yet another release cycle.

    Since the pass is intended to be short-lived, I've not added
    a command-line option for it.  The pass can be disabled using
    -fdisable-rtl-cc_fusion if necessary.

    Although what the pass does is independent of SVE, it's motivated
    only by SVE cases and doesn't trigger for any non-SVE test I've seen.
    I've therefore gated it on TARGET_SVE and restricted it to PTEST
    patterns.

    gcc/
            PR target/88836
            * config.gcc (aarch64*-*-*): Add aarch64-cc-fusion.o to extra_objs.
            * Makefile.in (RTL_SSA_H): New variable.
            * config/aarch64/t-aarch64 (aarch64-cc-fusion.o): New rule.
            * config/aarch64/aarch64-protos.h (make_pass_cc_fusion): Declare.
            * config/aarch64/aarch64-passes.def: Add pass_cc_fusion after
            pass_combine.
            * config/aarch64/aarch64-cc-fusion.cc: New file.

    gcc/testsuite/
            PR target/88836
            * gcc.target/aarch64/sve/acle/general/ldff1_8.c: New test.
            * gcc.target/aarch64/sve/ptest_1.c: Likewise.

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

* [Bug target/88836] [SVE] Redundant PTEST in loop test
       [not found] <bug-88836-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-01-15 16:46 ` cvs-commit at gcc dot gnu.org
@ 2021-01-15 17:06 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-01-15 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed for GCC 11.

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

end of thread, other threads:[~2021-01-15 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-88836-4@http.gcc.gnu.org/bugzilla/>
2020-08-11 14:25 ` [Bug target/88836] [SVE] Redundant PTEST in loop test mkuvyrkov at gcc dot gnu.org
2020-08-11 16:28 ` rsandifo at gcc dot gnu.org
2021-01-15 16:46 ` cvs-commit at gcc dot gnu.org
2021-01-15 17:06 ` rsandifo 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).