https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114741
--- Comment #7 from Wilco <wilco at gcc dot gnu.org> --- (In reply to Tamar Christina from comment #6) > and the exact armv9-a cost model you quoted, also does the right codegen. > https://godbolt.org/z/obafoT6cj > > There is just an inexplicable penalty being applied to the r->r alternative. Indeed it is not related to cost model - building SPEC shows a significant regression (~1%) with -mcpu=neoverse-v1 due to AND immediate being quite common in scalar code. The '^' incorrectly forces many cases to use the SVE alternative.