https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115478
--- Comment #10 from Jeffrey A. Law <law at gcc dot gnu.org> --- I took a quick look at the relevant loongarch patterns. I would expect that if you used an iterator in a similar manner it would "just work".