This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/43436] Missed vectorization: "unhandled data-ref"



------- Comment #7 from irar at il dot ibm dot com  2010-03-28 18:22 -------
(In reply to comment #5)
> When defining the missing function like this:
> 
> static inline int mid_pred(int a, int b, int c)
> {
>     int t= (a-b)&((a-b)>>31);
>     a-=t;
>     b+=t;
>     b-= (b-c)&((b-c)>>31);
>     b+= (a-b)&((a-b)>>31);
> 
>     return b;
> }
> 
> The vectorization reports: "not vectorized: unsupported use in stmt."

Yes, we have an unsupported cycles for l and lt, since they don't match regular
reduction pattern.

> 
> When this function is defined like this:
> static inline int mid_pred(int a, int b, int c)
> {
>   if(a>b){
>     if(c>b){
>       if(c>a) b=a;
>       else    b=c;
>     }
>   }else{
>     if(b>c){
>       if(c>a) b=c;
>       else    b=a;
>     }
>   }
>   return b;
> }
> 
> the vectorizer stops with: "not vectorized: control flow in loop."
> 

if-conversion fails with 
l_34 = *D.2750_33;
tree could trap...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43436


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]