Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions llvm/include/llvm/ADT/SparseBitVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ template <unsigned ElementSize = 128> struct SparseBitVectorElement {
bool unionWith(const SparseBitVectorElement &RHS) {
bool changed = false;
for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) {
BitWord old = changed ? 0 : Bits[i];
BitWord old = Bits[i];

Bits[i] |= RHS.Bits[i];
if (!changed && old != Bits[i])
if (old != Bits[i])
changed = true;
}
return changed;
Expand All @@ -199,13 +199,13 @@ template <unsigned ElementSize = 128> struct SparseBitVectorElement {

BecameZero = false;
for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) {
BitWord old = changed ? 0 : Bits[i];
BitWord old = Bits[i];

Bits[i] &= RHS.Bits[i];
if (Bits[i] != 0)
allzero = false;

if (!changed && old != Bits[i])
if (old != Bits[i])
changed = true;
}
BecameZero = allzero;
Expand All @@ -222,13 +222,13 @@ template <unsigned ElementSize = 128> struct SparseBitVectorElement {

BecameZero = false;
for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) {
BitWord old = changed ? 0 : Bits[i];
BitWord old = Bits[i];

Bits[i] &= ~RHS.Bits[i];
if (Bits[i] != 0)
allzero = false;

if (!changed && old != Bits[i])
if (old != Bits[i])
changed = true;
}
BecameZero = allzero;
Expand Down
Loading