This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43436] Missed vectorization: "unhandled data-ref"
- From: "irar at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2010 18:22:06 -0000
- Subject: [Bug tree-optimization/43436] Missed vectorization: "unhandled data-ref"
- References: <bug-43436-7780@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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