Stop static analyzer warnings about using bitwise operators on booleans. NFCI.

Call each of the rebase_if() calls separately.
This commit is contained in:
Simon Pilgrim 2019-11-02 22:38:07 +00:00
parent d801f79419
commit 2b2adef03d
1 changed files with 6 additions and 6 deletions

View File

@ -481,12 +481,12 @@ bool TypeInfer::EnforceSmallerThan(TypeSetByHwMode &Small,
if (any_of(S, isIntegerOrPtr) && any_of(S, isIntegerOrPtr)) {
auto NotInt = [](MVT VT) { return !isIntegerOrPtr(VT); };
Changed |= berase_if(S, NotInt) |
berase_if(B, NotInt);
Changed |= berase_if(S, NotInt);
Changed |= berase_if(B, NotInt);
} else if (any_of(S, isFloatingPoint) && any_of(B, isFloatingPoint)) {
auto NotFP = [](MVT VT) { return !isFloatingPoint(VT); };
Changed |= berase_if(S, NotFP) |
berase_if(B, NotFP);
Changed |= berase_if(S, NotFP);
Changed |= berase_if(B, NotFP);
} else if (S.empty() || B.empty()) {
Changed = !S.empty() || !B.empty();
S.clear();
@ -497,8 +497,8 @@ bool TypeInfer::EnforceSmallerThan(TypeSetByHwMode &Small,
}
if (none_of(S, isVector) || none_of(B, isVector)) {
Changed |= berase_if(S, isVector) |
berase_if(B, isVector);
Changed |= berase_if(S, isVector);
Changed |= berase_if(B, isVector);
}
}