Skip to content

Commit

Permalink
Merge pull request #286 from sx-aurora-dev/feature/fix-D157864-2
Browse files Browse the repository at this point in the history
Change computeRegUnitLaneMasks
  • Loading branch information
kaz7 authored Jan 24, 2024
2 parents da74ce7 + a99cceb commit 02954b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions llvm/utils/TableGen/CodeGenRegisters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ void CodeGenRegBank::computeRegUnitLaneMasks() {
// Create an initial lane mask for all register units.
const auto &RegUnits = Register.getRegUnits();
CodeGenRegister::RegUnitLaneMaskList RegUnitLaneMasks(
RegUnits.count(), LaneBitmask::getAll());
RegUnits.count(), LaneBitmask::getNone());
// Iterate through SubRegisters.
typedef CodeGenRegister::SubRegMap SubRegMap;
const SubRegMap &SubRegs = Register.getSubRegs();
Expand All @@ -2143,7 +2143,7 @@ void CodeGenRegBank::computeRegUnitLaneMasks() {
unsigned u = 0;
for (unsigned RU : RegUnits) {
if (SUI == RU) {
RegUnitLaneMasks[u] &= LaneMask;
RegUnitLaneMasks[u] |= LaneMask;
assert(!Found);
Found = true;
}
Expand All @@ -2153,6 +2153,10 @@ void CodeGenRegBank::computeRegUnitLaneMasks() {
assert(Found);
}
}
for (auto &Mask : RegUnitLaneMasks) {
if (Mask.none())
Mask = LaneBitmask::getAll();
}
Register.setRegUnitLaneMasks(RegUnitLaneMasks);
}
}
Expand Down

0 comments on commit 02954b3

Please sign in to comment.