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.