https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116013
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I attached my patches to PR 115086 which fixes this for aarch64. All that is needed after these patches get approved is either rename the current patterns in the i386 backend to be andn<mode>3 and iorn<mode>3 and it will work correctly. even for vector modes.