Hi, It looks like there are several issues out there for sve codegen with -mgeneral-regs-only. I have created a bug for that: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94678
We do ISA extension checks for SVE in check_required_extensions(aarch64-sve-builtins.cc). I think we may also need to check -mgeneral-regs-only there and issue an error message when this option is specified. This would be cheaper as compared with adding && TARGET_GENERAL_REGS_ONLY to TARGET_SVE and similar macros. Attached please find the proposed patch. Bootstrap and tested on aarch64 Linux platform. Suggestions? Thanks, Felix
pr94678-v1.patch
Description: pr94678-v1.patch