summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LivePhysRegs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LivePhysRegs.cpp')
-rw-r--r--llvm/lib/CodeGen/LivePhysRegs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index a456cdec42d..984b299e6eb 100644
--- a/llvm/lib/CodeGen/LivePhysRegs.cpp
+++ b/llvm/lib/CodeGen/LivePhysRegs.cpp
@@ -144,13 +144,13 @@ bool LivePhysRegs::available(const MachineRegisterInfo &MRI,
void LivePhysRegs::addBlockLiveIns(const MachineBasicBlock &MBB) {
for (const auto &LI : MBB.liveins()) {
MCSubRegIndexIterator S(LI.PhysReg, TRI);
- if (LI.LaneMask.all() || (!LI.LaneMask.none() && !S.isValid())) {
+ if (LI.LaneMask.all() || (LI.LaneMask.any() && !S.isValid())) {
addReg(LI.PhysReg);
continue;
}
for (; S.isValid(); ++S) {
unsigned SI = S.getSubRegIndex();
- if (!(LI.LaneMask & TRI->getSubRegIndexLaneMask(SI)).none())
+ if ((LI.LaneMask & TRI->getSubRegIndexLaneMask(SI)).any())
addReg(S.getSubReg());
}
}
OpenPOWER on IntegriCloud