public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/100087] New: Redundant extend with compare against zero for baseline Armv8-M
@ 2021-04-14 21:22 acoplan at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: acoplan at gcc dot gnu.org @ 2021-04-14 21:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100087
           Summary: Redundant extend with compare against zero for
                    baseline Armv8-M
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

For the following:

_Bool eq0(int x)
{
    return x == 0;
}

with -march=armv8-m.base -O2 we generate:

eq0:
        rsbs    r3, r0, #0
        adcs    r0, r0, r3
        uxtb    r0, r0
        bx      lr

but the uxtb is redundant.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-14 21:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 21:22 [Bug rtl-optimization/100087] New: Redundant extend with compare against zero for baseline Armv8-M acoplan 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).