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

--- Comment #6 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Thanks Richard.

I tried your patch. It does fix this issue.

But I wonder whether we should also adjust the following COND_LEN_UNARY too ?

Like this:

diff --git a/gcc/match.pd b/gcc/match.pd
index f559bfa4f2b..145ea925fa9 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -8965,7 +8965,7 @@ and,
    (with { tree op_type = TREE_TYPE (@3); }
     (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op),
op_type)
         && is_truth_type_for (op_type, TREE_TYPE (@0)))
-     (cond_op (bit_not @0) @2 @1)))))
+     (cond_op (bit_not @0) (view_convert @2) @1)))))

 (for uncond_op (UNCOND_UNARY)
      cond_op (COND_LEN_UNARY)
@@ -8980,7 +8980,7 @@ and,
    (with { tree op_type = TREE_TYPE (@3); }
     (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op),
op_type)
         && is_truth_type_for (op_type, TREE_TYPE (@0)))
-     (cond_op (bit_not @0) @2 @1 @4 @5)))))
+     (cond_op (bit_not @0) (view_convert @2) @1 @4 @5)))))

Reply via email to