Skip to content

Commit 5110d11

Browse files
committed
Tweak
1 parent e6ae6b0 commit 5110d11

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

llvm/lib/Target/AArch64/AArch64Subtarget.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,17 @@ AArch64Subtarget::AArch64Subtarget(const Triple &TT, StringRef CPU,
406406
}
407407

408408
unsigned AArch64Subtarget::getHwModeSet() const {
409+
AArch64HwModeBits Modes = AArch64HwModeBits::DefaultMode;
410+
409411
// Use a special hardware mode in streaming[-compatible] functions with
410412
// aarch64-enable-zpr-predicate-spills. This changes the spill size (and
411413
// alignment) for the predicate register class.
412414
if (EnableZPRPredicateSpills.getValue() &&
413415
(isStreaming() || isStreamingCompatible())) {
414-
return to_underlying(AArch64HwModeBits::SMEWithZPRPredicateSpills);
416+
Modes |= AArch64HwModeBits::SMEWithZPRPredicateSpills;
415417
}
416418

417-
return to_underlying(AArch64HwModeBits::DefaultMode);
419+
return to_underlying(Modes);
418420
}
419421

420422
const CallLowering *AArch64Subtarget::getCallLowering() const {

llvm/utils/TableGen/SubtargetEmitter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
21212121
for (unsigned M = 0, NumModes = CGH.getNumModeIds(); M != NumModes; ++M) {
21222122
StringRef ModeName = CGH.getModeName(M, /*IncludeDefault=*/true);
21232123
OS << " " << ModeName << " = ";
2124-
if (M == CodeGenHwModes::DefaultMode)
2124+
if (M == 0)
21252125
OS << "0";
21262126
else
21272127
OS << "(1 << " << (M - 1) << ")";

0 commit comments

Comments
 (0)