[Bug tree-optimization/100846] New: Different vector handling for strided IVs and modulo conditions
rsandifo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 1 07:22:02 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100846
Bug ID: 100846
Summary: Different vector handling for strided IVs and modulo
conditions
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rsandifo at gcc dot gnu.org
Target Milestone: ---
The following loops are equivalent, but we only vectorise the second:
void f1 (int *x)
{
for (int i = 0; i < 100; ++i)
if ((i & 1) == 0)
x[i] += 1;
}
void f2 (int *x)
{
for (int i = 0; i < 100; i += 2)
x[i] += 1;
}
I guess this isn't vectorisation-specific. Perhaps this is something that
ivcanon could handle?
More information about the Gcc-bugs
mailing list