https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118012
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Georg-Johann Lay from comment #8) > Isn't there a way to make match.md patterns conditional? match patterns should almost never be conditional unless it is producing direct internal functions. Basically gimple should be almost all target indepdendent except in the late stages. As I said I have some ideas of how to improve the situtation here; you will run into the same problem when the code is written the way that these match patterns are done too. One big idea is to change expand to expand things from gimple to rtl better. One way of doing this is add more optabs (and direct internal functions) and have isel pattern match into these optabs. I had a start of this but I didn't get time to finish it before stage1 ended. In this case the optab kinda of exists, cond_xor but currently it is only for vector modes currently. Expanding it for scalar modes and using it for isel can happen.