Those can end up generated by folding and at least for integer mode masks
      we cannot expect vcond expanders to exist.  We lower a ? b : c
      to (b & a) | (c & ~a).  */
-  if (!VECTOR_MODE_P (mode))
+  if (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (lhs))
+      && !VECTOR_MODE_P (mode))
     {
-      gcc_assert (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (lhs))
-                 && types_compatible_p (TREE_TYPE (op0), TREE_TYPE (op1)));
+      gcc_assert (types_compatible_p (TREE_TYPE (op0), TREE_TYPE (op1)));
       gimple_seq stmts = NULL;
       tree type = TREE_TYPE (lhs);
       location_t loc = gimple_location (stmt);