[Bug tree-optimization/58359] New: __builtin_unreachable prevents vectorization
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 8 08:20:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58359
Bug ID: 58359
Summary: __builtin_unreachable prevents vectorization
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
void f(int*q){
int*p=(int*)__builtin_assume_aligned(q,32);
for(int i=0;i<(1<<20);++i){
if(p+i==0)__builtin_unreachable();
p[i]=i;
}
}
If I remove the line with __builtin_unreachable, this is vectorized at -O3. But
as is, we have control flow in the loop and the vectorizer won't even try.
More information about the Gcc-bugs
mailing list