[llvm] 9aa0173 - [Hexagon] Add setting hvx-qfloat in HexagonMCSubtargetInfo
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 07:54:50 PST 2022
Author: Joshua Herrera
Date: 2022-01-05T07:54:33-08:00
New Revision: 9aa017342c8fa21ed0681fe16926b104de0af592
URL: https://github.com/llvm/llvm-project/commit/9aa017342c8fa21ed0681fe16926b104de0af592
DIFF: https://github.com/llvm/llvm-project/commit/9aa017342c8fa21ed0681fe16926b104de0af592.diff
LOG: [Hexagon] Add setting hvx-qfloat in HexagonMCSubtargetInfo
Added:
Modified:
llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
index dfdddb50657c2..fd85e1efef36a 100644
--- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
+++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
@@ -517,6 +517,14 @@ MCSubtargetInfo *Hexagon_MC::createHexagonMCSubtargetInfo(const Triple &TT,
return nullptr;
}
+ // Add qfloat subtarget feature by default to v68 and above
+ // unless explicitely disabled
+ if (checkFeature(X, Hexagon::ExtensionHVXV68) &&
+ ArchFS.find("-hvx-qfloat", 0) == std::string::npos) {
+ llvm::FeatureBitset Features = X->getFeatureBits();
+ X->setFeatureBits(Features.set(Hexagon::ExtensionHVXQFloat));
+ }
+
if (HexagonDisableDuplex) {
llvm::FeatureBitset Features = X->getFeatureBits();
X->setFeatureBits(Features.reset(Hexagon::FeatureDuplex));
More information about the llvm-commits
mailing list