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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the non-SVE code generation can be improved too.
With:

(simplify
 (negate
  (vec_pack_trunc:s
   (vec_cond:s @0 uniform_integer_cst_p@1 uniform_integer_cst_p@2)
   (vec_cond:s @3 @1 @2)))
  (with {
   tree outer_mask_type = truth_type_for (type);
   tree allones = build_minus_one_cst (type);
   tree zeros = build_zero_cst (type);
  }
  (if (integer_onep (@1) && integer_zerop (@2))
   (vec_cond (vec_pack_trunc:outer_mask_type @0 @3) { allones; } { zeros; } )
   (if (integer_onep (@2) && integer_zerop (@1))
    (vec_cond (vec_pack_trunc:outer_mask_type @0 @3) { zeros; } { allones; }
)))))


I will submit both later next week.

Reply via email to