https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69873
Bug ID: 69873 Summary: Vectorizer fails to emit runtime profitability check if no peeling/versioning is done Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- double a[1024]; void foo (unsigned n) { for (unsigned i = 0; i < n * 2; ++i) a[i] = 1.; } currently says the threshold is > 3 iterations but no such guard is added (whether that's a reasonable threshold is another question of course).