https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
--- Comment #53 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Richard Biener from comment #52) > I'm not working on this. Honza, I'd like to see loop-distribution > automatically disable pattern recognition when a) inside a function named > like patterns we detect (memcpy, memmove, strcpy, etc.), or just like any > builtin; or b) when > the [LTO] TU contains the definition of any of those. a is what is being done for LLVM, see https://github.com/llvm/llvm-project/pull/132572 where the strlen detection has to be relanded for that. More over LLVM disable the detection inside any function named, memset/memcpy/strlen/wcslen of all of the patterns including the SCCP related patterns rather than distribution based ones.