summaryrefslogtreecommitdiff
path: root/llvm/lib/TargetParser/AArch64TargetParser.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2025-07-30 17:10:46 +0100
committerJessica Clarke <jrtc27@jrtc27.com>2025-07-30 17:10:46 +0100
commit66393c8ec645d9121f2b3e53708b0379a113aa02 (patch)
treef2a740bc8ada2dde8506ea87bb6014a9b3722433 /llvm/lib/TargetParser/AArch64TargetParser.cpp
parent7e3a1d92899336f57a6af737c9641468a1dd19b3 (diff)
parent3e93964b896023b1006d3c878effb68203d4d8dd (diff)
Created using spr 1.3.5
Diffstat (limited to 'llvm/lib/TargetParser/AArch64TargetParser.cpp')
-rw-r--r--llvm/lib/TargetParser/AArch64TargetParser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/TargetParser/AArch64TargetParser.cpp b/llvm/lib/TargetParser/AArch64TargetParser.cpp
index 9432fc2c4ac8..7e3583275a73 100644
--- a/llvm/lib/TargetParser/AArch64TargetParser.cpp
+++ b/llvm/lib/TargetParser/AArch64TargetParser.cpp
@@ -55,7 +55,7 @@ std::optional<AArch64::FMVInfo> lookupFMVByID(AArch64::ArchExtKind ExtID) {
return {};
}
-uint64_t AArch64::getFMVPriority(ArrayRef<StringRef> Features) {
+APInt AArch64::getFMVPriority(ArrayRef<StringRef> Features) {
// Transitively enable the Arch Extensions which correspond to each feature.
ExtensionSet FeatureBits;
for (const StringRef Feature : Features) {
@@ -69,15 +69,15 @@ uint64_t AArch64::getFMVPriority(ArrayRef<StringRef> Features) {
}
// Construct a bitmask for all the transitively enabled Arch Extensions.
- uint64_t PriorityMask = 0;
+ APInt PriorityMask = APInt::getZero(128);
for (const FMVInfo &Info : getFMVInfo())
if (Info.ID && FeatureBits.Enabled.test(*Info.ID))
- PriorityMask |= (1ULL << Info.PriorityBit);
+ PriorityMask.setBit(Info.PriorityBit);
return PriorityMask;
}
-uint64_t AArch64::getCpuSupportsMask(ArrayRef<StringRef> Features) {
+APInt AArch64::getCpuSupportsMask(ArrayRef<StringRef> Features) {
// Transitively enable the Arch Extensions which correspond to each feature.
ExtensionSet FeatureBits;
for (const StringRef Feature : Features)
@@ -86,10 +86,10 @@ uint64_t AArch64::getCpuSupportsMask(ArrayRef<StringRef> Features) {
FeatureBits.enable(*Info->ID);
// Construct a bitmask for all the transitively enabled Arch Extensions.
- uint64_t FeaturesMask = 0;
+ APInt FeaturesMask = APInt::getZero(128);
for (const FMVInfo &Info : getFMVInfo())
if (Info.ID && FeatureBits.Enabled.test(*Info.ID))
- FeaturesMask |= (1ULL << Info.FeatureBit);
+ FeaturesMask.setBit(Info.FeatureBit);
return FeaturesMask;
}