https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97873
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- Created attachment 49588 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49588&action=edit Proposed patch Attached patch introduces relevant peephole2 pattern (and fixes some other issues).