lhutton1 commented on code in PR #16962:
URL: https://github.com/apache/tvm/pull/16962#discussion_r1587407739
##########
src/target/llvm/codegen_llvm.cc:
##########
@@ -1127,6 +1128,13 @@ void CodeGenLLVM::SetTargetAttributes(llvm::Function*
func) {
if (!features.empty()) {
func->addFnAttr("target-features", features);
}
+#if TVM_LLVM_VERSION >= 130
+ // Add vscale_range() function attribute when appropriate.
+ if (llvm_target_->TargetHasCPUFeature("sve") ||
llvm_target_->TargetHasCPUFeature("sme")) {
Review Comment:
Looks like I was incorrect about sme implying sve generally. From the
[reference manual](https://developer.arm.com/documentation/ddi0487/latest/):
> If FEAT_SME is implemented, this does not imply that FEAT_SVE and
FEAT_SVE2 are
implemented when the PE is not in Streaming SVE mode.
I'm not too sure why "+v9a" indicates "sve" in LLVM, as the manual suggests
this should be _optional_. For now, I think the safest option is to go back to
your original (sve and sme) check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]