From cb4ab9f5a6eaca0fd6c6d19895b022cfe7d987ac Mon Sep 17 00:00:00 2001 From: tlopex <820958424@qq.com> Date: Fri, 12 Jun 2026 02:36:54 -0400 Subject: [PATCH] [Codegen][LLVM][Tests] Gate +v9a vscale_range expectation on LLVM version Since LLVM 19, SVE/SVE2 are optional extensions of Armv9.0-A (llvm/llvm-project#96007), so "+v9a" no longer implies "+sve" and CodeGenAArch64 does not add the vscale_range() function attribute. Gate the expectation in test_vscale_range_function_attribute on llvm_version_major() < 19 so the test passes on both older LLVM (15-17, as used in CI) and LLVM 19+. --- tests/python/codegen/test_target_codegen_aarch64.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/python/codegen/test_target_codegen_aarch64.py b/tests/python/codegen/test_target_codegen_aarch64.py index 9191bea54934..1c5618bb6bec 100644 --- a/tests/python/codegen/test_target_codegen_aarch64.py +++ b/tests/python/codegen/test_target_codegen_aarch64.py @@ -587,7 +587,10 @@ def main(var_A: T.handle, var_B: T.handle, var_C: T.handle): [ ("+neon", False), ("+sve", True), - ("+v9a", True), + # Since LLVM 19, SVE/SVE2 are optional extensions of Armv9.0-A, so + # "+v9a" no longer implies "+sve" and no vscale_range() is added: + # https://releases.llvm.org/19.1.0/docs/ReleaseNotes.html#changes-to-the-aarch64-backend + ("+v9a", llvm_version_major() < 19), ("+sme", True), ], )