public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/94838] New: Failure to optimize out useless zero-ing after register was already zero-ed
@ 2020-04-29  1:32 gabravier at gmail dot com
  2020-04-29  2:06 ` [Bug target/94838] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gabravier at gmail dot com @ 2020-04-29  1:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94838
           Summary: Failure to optimize out useless zero-ing after
                    register was already zero-ed
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

int f(bool b, int *p)
{
    return b && *p;
}

GCC generates this with -O3:

f(bool, int*):
  xor eax, eax
  test dil, dil
  je .L1
  mov edx, DWORD PTR [rsi]
  xor eax, eax ; This can be removed, since eax is already 0 here
  test edx, edx
  setne al
.L1:
  ret

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

end of thread, other threads:[~2020-04-29  9:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  1:32 [Bug rtl-optimization/94838] New: Failure to optimize out useless zero-ing after register was already zero-ed gabravier at gmail dot com
2020-04-29  2:06 ` [Bug target/94838] " pinskia at gcc dot gnu.org
2020-04-29  6:50 ` gabravier at gmail dot com
2020-04-29  6:51 ` gabravier at gmail dot com
2020-04-29  6:53 ` gabravier at gmail dot com
2020-04-29  7:13 ` rguenth at gcc dot gnu.org
2020-04-29  9:00 ` [Bug rtl-optimization/94838] " ubizjak at gmail dot com

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).