[Hexagon] Add setting hvx-qfloat in HexagonMCSubtargetInfo

This commit is contained in:
Joshua Herrera 2021-12-28 11:21:47 -08:00 committed by Krzysztof Parzyszek
parent 055d8090d1
commit 9aa017342c
1 changed files with 8 additions and 0 deletions

View File

@ -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));