https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127706
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
I should mention this works:
```
typedef unsigned int v8u32 __attribute__((vector_size(32)));
typedef int v8i32 __attribute__((vector_size(32)));
__attribute__((noipa)) v8i32
f (v8u32 a, v8u32 b)
{
v8u32 d = a - b;
return (v8u32) d != (v8u32) { 0, 0, 0, 0, 0, 0, 0, 0 };
}
```
Because this pattern works already for vectors:
```
/* Transform comparisons of the form X - Y CMP 0 to X CMP Y.
??? The transformation is valid for the other operators if overflow
is undefined for the type, but performing it here badly interacts
with the transformation in fold_cond_expr_with_comparison which
attempts to synthetize ABS_EXPR. */
(for cmp (eq ne)
(for sub (minus pointer_diff)
(simplify
(cmp (sub@2 @0 @1) integer_zerop)
(if (single_use (@2))
(cmp @0 @1)))))
```