https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71732
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Well, instead of if (RTL_CONST_OR_PURE_CALL_P (insn)) you should certainly use else instead. If you invalidate all memory already, there is no point to invalidate the arguments, e.g. for looping const/pure fn call.