public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/87913] max(n, 1) code generation
       [not found] <bug-87913-4@http.gcc.gnu.org/bugzilla/>
@ 2023-05-06 19:22 ` pinskia at gcc dot gnu.org
  2023-05-30 15:44 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-06 19:22 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |10.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
G was fixed in GCC 10 by r10-4004-g15643a0dfc60e8 (aka PR 92140):


        cmpl    $1, %edi
        movl    %edi, %eax
        adcl    $0, %eax

That was all that was left to fix here so closing as such.

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

* [Bug target/87913] max(n, 1) code generation
       [not found] <bug-87913-4@http.gcc.gnu.org/bugzilla/>
  2023-05-06 19:22 ` [Bug target/87913] max(n, 1) code generation pinskia at gcc dot gnu.org
@ 2023-05-30 15:44 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-30 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:45466eecf5ef669164c0922e5be8fd288b144886

commit r14-1412-g45466eecf5ef669164c0922e5be8fd288b144886
Author: Andrew Pinski <apinski@marvell.com>
Date:   Tue May 16 14:26:41 2023 -0700

    Add a != MIN/MAX_VALUE_CST ? CST-+1 : a to minmax_from_comparison

    This patch adds the support for match that was implemented for PR 87913 in
phiopt.
    It implements it by adding support to minmax_from_comparison for the check.
    It uses the range information if available which allows to produce MIN/MAX
expression
    when comparing against the lower/upper bound of the range instead of
lower/upper
    of the type.

    minmax-20.c is the new testcase which tests the ranges part.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

    gcc/ChangeLog:

            * fold-const.cc (minmax_from_comparison): Add support for NE_EXPR.
            * match.pd ((cond (cmp (convert1? x) c1) (convert2? x) c2)
pattern):
            Add ne as a possible cmp.
            ((a CMP b) ? minmax<a, c> : minmax<b, c> pattern): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/minmax-22.c: New test.

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

end of thread, other threads:[~2023-05-30 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-87913-4@http.gcc.gnu.org/bugzilla/>
2023-05-06 19:22 ` [Bug target/87913] max(n, 1) code generation pinskia at gcc dot gnu.org
2023-05-30 15:44 ` cvs-commit 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).