aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Support/RISCVVIntrinsicUtils.cpp
diff options
context:
space:
mode:
authorBrandon Wu <brandon.wu@sifive.com>2023-11-03 10:52:37 +0800
committerGitHub <noreply@github.com>2023-11-03 10:52:37 +0800
commit74f38df1d1361f77fab56f6e647ebf37972faf7c (patch)
tree39b46063d91457e164c5de9249c4c7487b63f7bf /clang/lib/Support/RISCVVIntrinsicUtils.cpp
parent945d2e6e603dd9cc5d155a3a34b67ecf17b91b68 (diff)
downloadllvm-74f38df1d1361f77fab56f6e647ebf37972faf7c.zip
llvm-74f38df1d1361f77fab56f6e647ebf37972faf7c.tar.gz
llvm-74f38df1d1361f77fab56f6e647ebf37972faf7c.tar.bz2
[RISCV] Support Xsfvfnrclipxfqf extensions (#68297)
FP32-to-int8 Ranged Clip Instructions https://sifive.cdn.prismic.io/sifive/0aacff47-f530-43dc-8446-5caa2260ece0_xsfvfnrclipxfqf-spec.pdf
Diffstat (limited to 'clang/lib/Support/RISCVVIntrinsicUtils.cpp')
-rw-r--r--clang/lib/Support/RISCVVIntrinsicUtils.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index 597ee19..751d0ae 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -429,6 +429,9 @@ PrototypeDescriptor::parsePrototypeDescriptor(
case 'l':
PT = BaseTypeModifier::SignedLong;
break;
+ case 'f':
+ PT = BaseTypeModifier::Float32;
+ break;
default:
llvm_unreachable("Illegal primitive type transformers!");
}
@@ -665,6 +668,10 @@ void RVVType::applyModifier(const PrototypeDescriptor &Transformer) {
case BaseTypeModifier::SignedLong:
ScalarType = ScalarTypeKind::SignedLong;
break;
+ case BaseTypeModifier::Float32:
+ ElementBitwidth = 32;
+ ScalarType = ScalarTypeKind::Float;
+ break;
case BaseTypeModifier::Invalid:
ScalarType = ScalarTypeKind::Invalid;
return;
@@ -1149,7 +1156,7 @@ void RVVIntrinsic::updateNamesAndPolicy(
SmallVector<PrototypeDescriptor> parsePrototypes(StringRef Prototypes) {
SmallVector<PrototypeDescriptor> PrototypeDescriptors;
- const StringRef Primaries("evwqom0ztul");
+ const StringRef Primaries("evwqom0ztulf");
while (!Prototypes.empty()) {
size_t Idx = 0;
// Skip over complex prototype because it could contain primitive type