https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The fix actually might be simplier than I had expected because csneg is already implement, just need to extend it to csinv also like so: diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index f12a0bebd3d..8cd259fca9c 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -4203,15 +4203,15 @@ (define_insn "*csinv3<mode>_insn" [(set_attr "type" "csel")] ) -(define_insn "csneg3_uxtw_insn" +(define_insn "*cs<neg_not_cs>3_uxtw_insn4" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (if_then_else:SI (match_operand 1 "aarch64_comparison_operation" "") - (neg:SI (match_operand:SI 2 "register_operand" "r")) + (NEG_NOT:SI (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "aarch64_reg_or_zero" "rZ"))))] "" - "csneg\\t%w0, %w3, %w2, %M1" + "cs<neg_not_cs>\\t%w0, %w3, %w2, %M1" [(set_attr "type" "csel")] )