[Bug rtl-optimization/115565] [11/12/13/14/15 Regression] CSE: Comparison incorrectly evaluated as constant causing optimization to produce wrong code
roger at nextmovesoftware dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 20 19:58:34 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115565
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-06-20
Status|UNCONFIRMED |NEW
CC| |roger at nextmovesoftware dot com
Ever confirmed|0 |1
--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
Doh! I hadn't noticed (twenty years ago) that -1 was used to represent an
invalid quantity number in CSE's comparison_qty field. There was no mention of
this in my post or patch. Using INT_MIN looks like a reasonable (good) fix.
Presumably backends that constrain values in hard register zero (before reload)
are rare, which is why no-one has noticed/been affected by this.
Thanks for the fix, and my apologies for the inconvenience.
More information about the Gcc-bugs
mailing list