https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86771
--- Comment #14 from Wilco <wilco at gcc dot gnu.org> --- Note there is also an issue with costs, if the cost is zero then it seems to behave like infinite cost. It would be better to properly cost an instruction sequence given there is a new interface for this now. If the cost is still zero, it could get the default cost rather than being treated like infinite cost, resulting in non-optimal replacements.