public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/95737] New: PPC: Unnecessary extsw after negative less than
@ 2020-06-18  8:10 jens.seifert at de dot ibm.com
  2020-06-19 16:40 ` [Bug target/95737] " wschmidt at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jens.seifert at de dot ibm.com @ 2020-06-18  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95737
           Summary: PPC: Unnecessary extsw after negative less than
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jens.seifert at de dot ibm.com
  Target Milestone: ---

unsigned long long negativeLessThan(unsigned long long a, unsigned long long b)
{
   return -(a < b);
}

gcc -m64 -O2 -save-temps negativeLessThan.C

creates

_Z16negativeLessThanyy:
.LFB0:
        .cfi_startproc
        subfc 4,4,3
        subfe 3,3,3
        extsw 3,3
        blr

The extsw is not necessary.

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

end of thread, other threads:[~2022-07-29  2:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18  8:10 [Bug target/95737] New: PPC: Unnecessary extsw after negative less than jens.seifert at de dot ibm.com
2020-06-19 16:40 ` [Bug target/95737] " wschmidt at gcc dot gnu.org
2020-06-19 16:42 ` wschmidt at gcc dot gnu.org
2020-06-19 17:43 ` jens.seifert at de dot ibm.com
2020-06-21 15:35 ` wschmidt at linux dot ibm.com
2020-06-21 16:30 ` segher at gcc dot gnu.org
2022-01-06  5:39 ` guihaoc at gcc dot gnu.org
2022-01-13 12:19 ` segher at gcc dot gnu.org
2022-01-13 16:34 ` segher at gcc dot gnu.org
2022-01-14  9:16 ` guihaoc at gcc dot gnu.org
2022-05-18  5:24 ` cvs-commit at gcc dot gnu.org
2022-07-29  2:52 ` guihaoc 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).