https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67351
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Oh his patch only handled multiplies/divide and not shifts. But it should be easy to add them to match.pd to simplify this at the tree level.