public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/83403] Missed register promotion opportunities in loop
       [not found] <bug-83403-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-28  6:27 ` luoxhu at gcc dot gnu.org
  2020-05-11  5:06 ` cvs-commit at gcc dot gnu.org
  2020-05-12  0:44 ` luoxhu at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: luoxhu at gcc dot gnu.org @ 2020-04-28  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

luoxhu at gcc dot gnu.org changed:

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

--- Comment #7 from luoxhu at gcc dot gnu.org ---
int could pass but unsigned will fail to capture the refs independent, drafted
a patch to use the range info when checking the CONVERT expression on
PLUS/MINUS/MULT for wrapping overflow(unsigned).

https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544684.html


(gdb) p debug_aff(&off1)
{
  type = sizetype
  offset = 8
  elements = {
    [0] = (long unsigned int) n_93 * 80,
    [1] = &C * 1
  }
}
$571 = void
(gdb) p debug_aff(&off2)
{
  type = sizetype
  offset = 0
  elements = {
    [0] = (long unsigned int) n_93 * 80,
    [1] = &C * 1
  }
}

Is this a reasonable solution, please?

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

* [Bug tree-optimization/83403] Missed register promotion opportunities in loop
       [not found] <bug-83403-4@http.gcc.gnu.org/bugzilla/>
  2020-04-28  6:27 ` [Bug tree-optimization/83403] Missed register promotion opportunities in loop luoxhu at gcc dot gnu.org
@ 2020-05-11  5:06 ` cvs-commit at gcc dot gnu.org
  2020-05-12  0:44 ` luoxhu at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-11  5:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 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:0447929f11e6a3e1b076841712b90a8b6bc7d33a

commit r11-259-g0447929f11e6a3e1b076841712b90a8b6bc7d33a
Author: Xionghu Luo <luoxhu@linux.ibm.com>
Date:   Sun May 10 21:06:20 2020 -0500

    Add handling of MULT_EXPR/PLUS_EXPR for wrapping overflow in affine
combination(PR83403)

    Use determine_value_range to get value range info for fold convert
expressions
    with internal operation PLUS_EXPR/MINUS_EXPR/MULT_EXPR when not overflow on
    wrapping overflow inner type.  i.e.:

    (long unsigned int)((unsigned int)n * 10 + 1)
    =>
    (long unsigned int)n * (long unsigned int)10 + (long unsigned int)1

    With this patch for affine combination, load/store motion could detect
    more address refs independency and promote some memory expressions to
    registers within loop.

    PS: Replace the previous "(T1)(X + CST) as (T1)X - (T1)(-CST))"
    to "(T1)(X + CST) as (T1)X + (T1)(CST))" for wrapping overflow.

    Bootstrap and regression tested pass on Power8-LE.

    gcc/ChangeLog

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

            PR tree-optimization/83403
            * tree-affine.c (expr_to_aff_combination): Replace SSA_NAME with
            determine_value_range, Add fold conversion of MULT_EXPR, fix the
            previous PLUS_EXPR.

    gcc/testsuite/ChangeLog

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

            PR tree-optimization/83403
            * gcc.dg/tree-ssa/pr83403-1.c: New test.
            * gcc.dg/tree-ssa/pr83403-2.c: New test.
            * gcc.dg/tree-ssa/pr83403.h: New header.

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

* [Bug tree-optimization/83403] Missed register promotion opportunities in loop
       [not found] <bug-83403-4@http.gcc.gnu.org/bugzilla/>
  2020-04-28  6:27 ` [Bug tree-optimization/83403] Missed register promotion opportunities in loop luoxhu at gcc dot gnu.org
  2020-05-11  5:06 ` cvs-commit at gcc dot gnu.org
@ 2020-05-12  0:44 ` luoxhu at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: luoxhu at gcc dot gnu.org @ 2020-05-12  0:44 UTC (permalink / raw)
  To: gcc-bugs

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

luoxhu at gcc dot gnu.org changed:

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

--- Comment #9 from luoxhu at gcc dot gnu.org ---
Fixed on master.

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

end of thread, other threads:[~2020-05-12  0:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-83403-4@http.gcc.gnu.org/bugzilla/>
2020-04-28  6:27 ` [Bug tree-optimization/83403] Missed register promotion opportunities in loop luoxhu at gcc dot gnu.org
2020-05-11  5:06 ` cvs-commit at gcc dot gnu.org
2020-05-12  0:44 ` luoxhu 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).