[Bug tree-optimization/112723] Missed optimization for invariants 'c+c' when c += -2147483648 and c is a global variable
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 27 09:51:30 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112723
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Keywords| |missed-optimization, TREE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The argument case is only optimized at the RTL level:
Trying 8 -> 9:
8: {r87:SI=r85:SI-0x80000000;clobber flags:CC;}
REG_DEAD r85:SI
REG_UNUSED flags:CC
9: {r88:SI=r87:SI<<0x1;clobber flags:CC;}
REG_DEAD r87:SI
REG_UNUSED flags:CC
Successfully matched this instruction:
(parallel [
(set (reg:SI 88)
(ashift:SI (reg/v:SI 85 [ cD.2766 ])
(const_int 1 [0x1])))
(clobber (reg:CC 17 flags))
])
More information about the Gcc-bugs
mailing list