https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102981
Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> --- I have no strong opinions about this specific testcase. More generally I am in agreement with Zdenek and others that the threaders should not be peeling iterations off loops or rotating loops. Fundamentally the threaders don't have the kind of costing model to know if peeling an iteration off is profitable or not. So even after the loop optimizers are done, I'd still lean against peeling since if it was profitable it should have been done by the loop optimizer or vectorizer. So unless someone can show this is a significant issue in real world code, I would argue that it ought to be fixed by including the possibility of eliminating unreachable code int he profitibility analysis for loop peeling by the loop optimizers and possibly the unroller (for this specific example).