isConditionalBranch/isUnconditionalBranch - use boolean operators. NFCI.

Stop static analyzer warnings about using bitwise operators on booleans.
This commit is contained in:
Simon Pilgrim 2019-11-02 21:28:37 +00:00
parent f0c2a5af76
commit 9a9c07d711
2 changed files with 4 additions and 4 deletions

View File

@ -718,7 +718,7 @@ public:
/// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more
/// information about this branch.
bool isConditionalBranch(QueryType Type = AnyInBundle) const {
return isBranch(Type) & !isBarrier(Type) & !isIndirectBranch(Type);
return isBranch(Type) && !isBarrier(Type) && !isIndirectBranch(Type);
}
/// Return true if this is a branch which always
@ -726,7 +726,7 @@ public:
/// TargetInstrInfo::AnalyzeBranch method can be used to get more information
/// about this branch.
bool isUnconditionalBranch(QueryType Type = AnyInBundle) const {
return isBranch(Type) & isBarrier(Type) & !isIndirectBranch(Type);
return isBranch(Type) && isBarrier(Type) && !isIndirectBranch(Type);
}
/// Return true if this instruction has a predicate operand that

View File

@ -304,7 +304,7 @@ public:
/// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more
/// information about this branch.
bool isConditionalBranch() const {
return isBranch() & !isBarrier() & !isIndirectBranch();
return isBranch() && !isBarrier() && !isIndirectBranch();
}
/// Return true if this is a branch which always
@ -312,7 +312,7 @@ public:
/// TargetInstrInfo::AnalyzeBranch method can be used to get more information
/// about this branch.
bool isUnconditionalBranch() const {
return isBranch() & isBarrier() & !isIndirectBranch();
return isBranch() && isBarrier() && !isIndirectBranch();
}
/// Return true if this is a branch or an instruction which directly