diff --git a/build/make/configure.sh b/build/make/configure.sh index b26878f360b..93643f3de37 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -439,6 +439,22 @@ check_neon_sve_bridge_compiles() { #include EOF compile_result=$? + if [ ${compile_result} -eq 0 ]; then + # Check whether the compiler can compile SVE functions that require + # backup/restore of SVE registers according to AAPCS. Clang for Windows + # used to fail this, see + # https://github.com/llvm/llvm-project/issues/80009. + check_cc -march=armv8.2-a+dotprod+i8mm+sve < +void other(void); +svfloat32_t func(svfloat32_t a) { + other(); + return a; +} +EOF + compile_result=$? + fi + if [ ${compile_result} -ne 0 ]; then log_echo " disabling sve: arm_neon_sve_bridge.h not supported by compiler" disable_feature sve