[PATCH] D102051: [RISCV] Consider scalar types for required extensions.
Hsiangkai Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 7 13:08:10 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc04c66d705b4: [RISCV] Consider scalar types for required extensions. (authored by HsiangKai).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102051/new/
https://reviews.llvm.org/D102051
Files:
clang/utils/TableGen/RISCVVEmitter.cpp
Index: clang/utils/TableGen/RISCVVEmitter.cpp
===================================================================
--- clang/utils/TableGen/RISCVVEmitter.cpp
+++ clang/utils/TableGen/RISCVVEmitter.cpp
@@ -107,6 +107,9 @@
bool isFloatVector(unsigned Width) const {
return isVector() && isFloat() && ElementBitwidth == Width;
}
+ bool isFloat(unsigned Width) const {
+ return isFloat() && ElementBitwidth == Width;
+ }
private:
// Verify RVV vector type and set Valid.
@@ -765,11 +768,11 @@
}
// Init RISC-V extensions
for (const auto &T : OutInTypes) {
- if (T->isFloatVector(16))
+ if (T->isFloatVector(16) || T->isFloat(16))
RISCVExtensions |= RISCVExtension::Zfh;
- else if (T->isFloatVector(32))
+ else if (T->isFloatVector(32) || T->isFloat(32))
RISCVExtensions |= RISCVExtension::F;
- else if (T->isFloatVector(64))
+ else if (T->isFloatVector(64) || T->isFloat(64))
RISCVExtensions |= RISCVExtension::D;
}
if (RequiredExtension == "Zvamo")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102051.343745.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210507/ee521e31/attachment.bin>
More information about the cfe-commits
mailing list