aom: Enable I8MM when compiling SVE2 files

From e6dad63399fa65c0daf38d667d7f64b0e72df8e4 Mon Sep 17 00:00:00 2001
From: Salome Thirot <[EMAIL REDACTED]>
Date: Thu, 16 May 2024 10:51:15 +0100
Subject: [PATCH] Enable I8MM when compiling SVE2 files

The CPU feature detection logic assumes that if SVE2 is available then
all previous features are available as well (SVE, NEON_DOTPROD and
NEON_I8MM). Add 'i8mm' to the compiler flags for SVE2 files to reflect
these constraints. It's not necessary to add 'sve' or 'dotprod' as they
are implied by the 'armv9' flag.

Change-Id: I7e81b041910676af870eb0f45d3ed3a4014d31be
---
 build/cmake/cpu.cmake | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/build/cmake/cpu.cmake b/build/cmake/cpu.cmake
index 8d0acf3d2..6e6fdb8e2 100644
--- a/build/cmake/cpu.cmake
+++ b/build/cmake/cpu.cmake
@@ -19,7 +19,8 @@ if("${AOM_TARGET_CPU}" STREQUAL "arm64")
   set(AOM_NEON_DOTPROD_DEFAULT_FLAG "-march=armv8.2-a+dotprod")
   set(AOM_NEON_I8MM_DEFAULT_FLAG "-march=armv8.2-a+dotprod+i8mm")
   set(AOM_SVE_DEFAULT_FLAG "-march=armv8.2-a+dotprod+i8mm+sve")
-  set(AOM_SVE2_DEFAULT_FLAG "-march=armv9-a+sve2") # SVE2 is a v9-only feature
+  set(AOM_SVE2_DEFAULT_FLAG "-march=armv9-a+i8mm+sve2") # SVE2 is a v9-only
+                                                        # feature
 
   # Check that the compiler flag to enable each flavor is supported by the
   # compiler. This may not be the case for new architecture features on old