public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61837] missed loop invariant expression optimization
Date: Fri, 15 May 2020 03:27:11 +0000	[thread overview]
Message-ID: <bug-61837-4-Yx2F4Wd44K@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61837-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xiong Hu Luo <luoxhu@gcc.gnu.org>:

https://gcc.gnu.org/g:8a15faa730f99100f6f3ed12663563356ec5a2c0

commit r11-407-g8a15faa730f99100f6f3ed12663563356ec5a2c0
Author: Xionghu Luo <luoxhu@linux.ibm.com>
Date:   Thu May 14 21:03:24 2020 -0500

    Fold (add -1; zero_ext; add +1) operations to zero_ext when not
overflow(PR37451, PR61837)

    This "subtract/extend/add" existed for a long time and still annoying us
    (PR37451, part of PR61837) when converting from 32bits to 64bits, as the
ctr
    register is used as 64bits on powerpc64, Andraw Pinski had a patch but
    caused some issue and reverted by Joseph S. Myers(PR37451, PR37782).

    Andraw:
    http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01070.html
    http://gcc.gnu.org/ml/gcc-patches/2008-10/msg01321.html
    Joseph:
    https://gcc.gnu.org/legacy-ml/gcc-patches/2011-11/msg02405.html

    We still can do the simplification from "subtract/zero_ext/add" to
"zero_ext"
    when loop iterations is known to be LT than MODE_MAX (only do simplify
    when counter+0x1 NOT overflow).

    Bootstrap and regression tested pass on Power8-LE.

    gcc/ChangeLog

            2020-05-15  Xiong Hu Luo  <luoxhu@linux.ibm.com>

            PR rtl-optimization/37451, part of PR target/61837
            * loop-doloop.c (doloop_simplify_count): New function.  Simplify
            (add -1; zero_ext; add +1) to zero_ext when not wrapping.
            (doloop_modify): Call doloop_simplify_count.

    gcc/testsuite/ChangeLog

            2020-05-15  Xiong Hu Luo  <luoxhu@linux.ibm.com>

            PR rtl-optimization/37451, part of PR target/61837
            * gcc.target/powerpc/doloop-2.c: New test.

  parent reply	other threads:[~2020-05-15  3:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-61837-4@http.gcc.gnu.org/bugzilla/>
2020-04-07  7:30 ` luoxhu at gcc dot gnu.org
2020-04-07 16:37 ` segher at gcc dot gnu.org
2020-04-13 10:31 ` luoxhu at gcc dot gnu.org
2020-04-14  6:42 ` segher at gcc dot gnu.org
2020-04-14  7:01 ` luoxhu at gcc dot gnu.org
2020-04-14  7:26 ` segher at gcc dot gnu.org
2020-04-14  7:52 ` luoxhu at gcc dot gnu.org
2020-04-14 10:37 ` rguenth at gcc dot gnu.org
2020-05-15  3:27 ` cvs-commit at gcc dot gnu.org [this message]
2021-07-29  0:43 ` cvs-commit at gcc dot gnu.org
2021-08-12  2:17 ` guojiufu at gcc dot gnu.org

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=bug-61837-4-Yx2F4Wd44K@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).