Skip to content

Commit

Permalink
Change computeRegUnitLaneMasks
Browse files Browse the repository at this point in the history
Change computeRegUnitLaneMasks to partially revert D157864 modification since
this cause some problems on VE backend.
  llvm/llvm-project#78942 (comment)
  • Loading branch information
kaz7 committed Jan 23, 2024
1 parent da74ce7 commit a99cceb
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 a99cceb

Please sign in to comment.