git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230964
91177308-0d34-0410-b5e6-
96231b3b80d8
struct MaskRolPair {
unsigned Mask;
uint8_t RotateLeft;
- bool operator==(const MaskRolPair Other) {
+ bool operator==(const MaskRolPair Other) const {
return Mask == Other.Mask && RotateLeft == Other.RotateLeft;
}
- bool operator!=(const MaskRolPair Other) {
+ bool operator!=(const MaskRolPair Other) const {
return Mask != Other.Mask || RotateLeft != Other.RotateLeft;
}
};
for (size_t s = 0, se = Sequences.size(); s != se; ++s, SIdx = NextSIdx) {
SmallVectorImpl<MaskRolPair> &Sequence = Sequences[s];
NextSIdx = SIdx + Sequence.size() + 1;
- if (Sequence.size() != IdxSequence.size())
- continue;
- bool Identical = true;
- for (size_t o = 0, oe = Sequence.size(); o != oe; ++o) {
- if (Sequence[o] != IdxSequence[o]) {
- Identical = false;
- break;
- }
- }
- if (Identical) {
+ if (Sequence == IdxSequence) {
Found = SIdx;
break;
}