https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105490

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=111149

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So what is interesting is we do handle:
```
#define N 256
typedef short T;
extern T a[N];
extern T b[N];
extern T c[N];
extern _Bool pb[N];
extern _Bool pb1[N];

void predicate_by_bool_ne()
{
  for (int i = 0; i < N; i++)
    c[i] = pb[i] != pb1[i] ? a[i] : b[i];
}
```

But not:
```
#define N 256
typedef short T;
extern T a[N];
extern T b[N];
extern T c[N];
extern _Bool pb[N];
extern _Bool pb1[N];

void predicate_by_bool_and()
{
  for (int i = 0; i < N; i++)
    c[i] = (pb[i] & pb1[i]) ? a[i] : b[i];
}
```

And If I change the canonical form of `bool != bool` into `bool ^ bool` things
break down in a similar way. I tried to look into a reasonible way of handling
this in the vectorizer but I could not figure out how to treat `^` in the same
way as `!=`.

Reply via email to