out (le gt gt le ge lt lt ge )
(simplify
(cmp:c (minmax:c @0 @1) @0)
- (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)))
+ (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && (!VECTOR_TYPE_P (TREE_TYPE (@0))
+ || (VECTOR_TYPE_P (type)
+ && (!expand_vec_cmp_expr_p (TREE_TYPE (@0), type, cmp)
+ || expand_vec_cmp_expr_p (TREE_TYPE (@0), type, out)))))
(out @0 @1))))
/* MIN (X, 5) == 0 -> X == 0
MIN (X, 5) == 7 -> false */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-vect-cost-model" } */
+/* { dg-additional-options "-mavx" { target { x86_64-*-* i?86-*-* } } } */
+
+void g();
+void f(long *a)
+{
+ long b0 = a[0] > 0 ? a[0] : 0;
+ long b1 = a[1] > 0 ? a[1] : 0;
+ if ((b0|b1) == 0)
+ g();
+}