[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 00:07:31 PST 2025
================
@@ -68,7 +68,7 @@ class RISCVTargetInfo : public TargetInfo {
return TargetInfo::VoidPtrBuiltinVaList;
}
- std::string_view getClobbers() const override { return ""; }
+ std::string_view getClobbers() const override { return "~{vl},~{vtype}"; }
----------------
wangpc-pp wrote:
```suggestion
std::string_view getClobbers() const override {
if (ISAInfo->hasExtension("zve32x"))
return "~{vl},~{vtype}";
return "";
}
```
https://github.com/llvm/llvm-project/pull/128636
More information about the llvm-commits
mailing list