https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97042
Bug ID: 97042
Summary: powerpc64 UINT_MAX constant
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: amodra at gmail dot com
Target Milestone: ---
/* -O2 -S */
long foo (long x) { return ~0u - x; }
for gcc-8 to current master
lis 9,0xffff
ori 9,9,0xffff
rldicl 9,9,0,32
subf 3,3,9
blr
a regression from gcc-7
li 9,-1
rldicl 9,9,0,32
subf 3,3,9
blr
Both sequences give the same result, this is just a code quality regression.
I haven't properly debugged this but I suspect commit 5d3ae76af13