public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/94889] New: Negate function not getting optimised to negate call
@ 2020-04-30 14:32 satanichiya at waifu dot club
  2020-04-30 14:42 ` [Bug c/94889] " gabravier at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: satanichiya at waifu dot club @ 2020-04-30 14:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94889
           Summary: Negate function not getting optimised to negate call
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: satanichiya at waifu dot club
  Target Milestone: ---

int func(int x)
{
    for(int i=0;i<sizeof(int)*8;i++)
    {
        x ^= (int)1<<i;
    }
    return x;
}

Does not get optimised to just a negate instruction

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

end of thread, other threads:[~2023-10-12  3:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 14:32 [Bug c/94889] New: Negate function not getting optimised to negate call satanichiya at waifu dot club
2020-04-30 14:42 ` [Bug c/94889] " gabravier at gmail dot com
2020-04-30 14:52 ` [Bug c/94889] Negate function not getting optimised to bitwise not satanichiya at waifu dot club
2020-04-30 14:57 ` satanichiya at waifu dot club
2020-04-30 15:14 ` gabravier at gmail dot com
2020-04-30 19:50 ` [Bug tree-optimization/94889] " pinskia at gcc dot gnu.org
2020-05-01  7:04 ` schwab@linux-m68k.org
2021-08-22  0:25 ` pinskia at gcc dot gnu.org
2023-10-12  3:46 ` pinskia 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).