Skip to content

Commit eae3b4c

Browse files
committed
Check only for "sve" target feature
1 parent ba3c477 commit eae3b4c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/target/llvm/codegen_llvm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ void CodeGenLLVM::SetTargetAttributes(llvm::Function* func) {
11301130
}
11311131
#if TVM_LLVM_VERSION >= 130
11321132
// Add vscale_range() function attribute when appropriate.
1133-
if (llvm_target_->TargetHasCPUFeature("sve") || llvm_target_->TargetHasCPUFeature("sme")) {
1133+
if (llvm_target_->TargetHasCPUFeature("sve")) {
11341134
func->addFnAttr(llvm::Attribute::getWithVScaleRangeArgs(
11351135
*llvm_target_->GetContext(), 1, tvm::arith::kAArch64VScaleValues.size()));
11361136
}

tests/python/codegen/test_target_codegen_aarch64.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,7 @@ def my_func(a: T.handle):
546546
[
547547
("+neon", False),
548548
("+sve", True),
549-
("+v9a", True),
550-
("+sme", True),
549+
("+v9a,+sme", True),
551550
],
552551
)
553552
def test_vscale_range_function_attribute(mattr, expect_attr):

0 commit comments

Comments
 (0)