https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118466
Bug ID: 118466
Summary: Not removing bounds checking enough to vectorize
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Blocks: 85316
Target Milestone: ---
Take:
```
typedef __SIZE_TYPE__ size_t;
void f(size_t t, int *v1, int *s2) {
for (size_t i = 0; i != t; i++) {
if (!(i < t)) __builtin_abort();
v1[i] = s2[i];
}
}
```
VRP2 is able to remove the bounds check that is inside the loop but that is too
late to vectorize the loop.
Note I found this while looking into PR 118464 which is an issue with the early
out vectorizer.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316
[Bug 85316] [meta-bug] VRP range propagation missed cases