https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110812
--- Comment #26 from Kito Cheng <kito at gcc dot gnu.org> --- Hi Andreas: Thanks for report the test result! And I can reproduce the highway's issue on my hand, and I suspect it's FRE's bug, I can pass with drop few patterns in gimple.md: ```diff diff --git a/gcc/match.pd b/gcc/match.pd index 66e8a7874493..198db5a0e069 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -10705,13 +10705,13 @@ and, (simplify (vec_cond @0 (view_convert? (uncond_op@3 @1)) @2) (with { tree op_type = TREE_TYPE (@3); } - (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) + (if (false && vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) && is_truth_type_for (op_type, TREE_TYPE (@0))) (cond_op @0 (view_convert @1) @2)))) (simplify (vec_cond @0 @1 (view_convert? (uncond_op@3 @2))) (with { tree op_type = TREE_TYPE (@3); } - (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) + (if (false && 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) (view_convert @2) @1))))) ``` The issue seems like the FRE's code expect the stmt is gassign but the stmt became gcall (.COND_NE) during gimple simplify, so it should not a RISC-V specific bug, I will try to extract a reduce case and file a bug for that, and meanwhile, I will send out my patch to mailing list for review :) Thanks again :)