Lines Matching defs:BG

1944     for (auto &BG : BitGroups) {
1945 unsigned RLAmtKey = BG.RLAmt + (BG.Repl32 ? 64 : 0);
1946 ValueRotInfo &VRI = ValueRots[std::make_pair(BG.V, RLAmtKey)];
1947 VRI.V = BG.V;
1948 VRI.RLAmt = BG.RLAmt;
1949 VRI.Repl32 = BG.Repl32;
1951 VRI.FirstGroupStartIdx = std::min(VRI.FirstGroupStartIdx, BG.StartIdx);
1982 auto IsAllLow32 = [this](BitGroup & BG) {
1983 if (BG.StartIdx <= BG.EndIdx) {
1984 for (unsigned i = BG.StartIdx; i <= BG.EndIdx; ++i) {
1991 for (unsigned i = BG.StartIdx; i < Bits.size(); ++i) {
1997 for (unsigned i = 0; i <= BG.EndIdx; ++i) {
2008 for (auto &BG : BitGroups) {
2012 if (BG.RLAmt == 0) {
2013 auto PotentiallyMerged = [this](BitGroup & BG) {
2015 if (&BG != &BG2 && BG.V == BG2.V &&
2020 if (!PotentiallyMerged(BG))
2023 if (BG.StartIdx < 32 && BG.EndIdx < 32) {
2024 if (IsAllLow32(BG)) {
2025 if (BG.RLAmt >= 32) {
2026 BG.RLAmt -= 32;
2027 BG.Repl32CR = true;
2030 BG.Repl32 = true;
2033 << BG.V.getNode() << " RLAmt = " << BG.RLAmt << " ["
2034 << BG.StartIdx << ", " << BG.EndIdx << "]\n");
2252 eraseMatchingBitGroups([VRI](const BitGroup &BG) {
2253 return BG.V == VRI.V && BG.RLAmt == VRI.RLAmt;
2285 eraseMatchingBitGroups([VRI](const BitGroup &BG) {
2286 return BG.V == VRI.V && BG.RLAmt == VRI.RLAmt;
2293 for (auto &BG : BitGroups) {
2296 { TruncateToInt32(BG.V, dl), getI32Imm(BG.RLAmt, dl),
2297 getI32Imm(Bits.size() - BG.EndIdx - 1, dl),
2298 getI32Imm(Bits.size() - BG.StartIdx - 1, dl) };
2302 { Res, TruncateToInt32(BG.V, dl), getI32Imm(BG.RLAmt, dl),
2303 getI32Imm(Bits.size() - BG.EndIdx - 1, dl),
2304 getI32Imm(Bits.size() - BG.StartIdx - 1, dl) };
2496 auto MatchingBG = [VRI](const BitGroup &BG) {
2497 if (VRI.V != BG.V)
2500 unsigned EffRLAmt = BG.RLAmt;
2501 if (!VRI.Repl32 && BG.Repl32) {
2502 if (BG.StartIdx < 32 && BG.EndIdx < 32 && BG.StartIdx <= BG.EndIdx &&
2503 !BG.Repl32Coalesced) {
2504 if (BG.Repl32CR)
2509 } else if (VRI.Repl32 != BG.Repl32) {
2516 for (auto &BG : BitGroups) {
2517 if (!MatchingBG(BG))
2520 if (BG.StartIdx <= BG.EndIdx) {
2521 for (unsigned i = BG.StartIdx; i <= BG.EndIdx; ++i)
2524 for (unsigned i = BG.StartIdx; i < Bits.size(); ++i)
2526 for (unsigned i = 0; i <= BG.EndIdx; ++i)
2555 for (auto &BG : BitGroups) {
2556 if (!MatchingBG(BG)) {
2561 SelectRotMask64Count(BG.RLAmt, BG.Repl32, BG.StartIdx, BG.EndIdx,
2676 for (auto &BG : BitGroups) {
2677 if (BG.V != VRI.V || BG.RLAmt != VRI.RLAmt ||
2678 BG.Repl32 != VRI.Repl32)
2683 if (BG.StartIdx < 32 && BG.EndIdx < 32 && BG.StartIdx < BG.EndIdx)
2700 eraseMatchingBitGroups([VRI](const BitGroup &BG) {
2701 return BG.V == VRI.V && BG.RLAmt == VRI.RLAmt &&
2702 BG.Repl32 == VRI.Repl32;
2715 BitGroup BG = *I;
2717 BitGroups.insert(BitGroups.begin(), BG);
2725 for (auto &BG : BitGroups) {
2727 Res = SelectRotMask64(BG.V, dl, BG.RLAmt, BG.Repl32, BG.StartIdx,
2728 BG.EndIdx, InstCnt);
2730 Res = SelectRotMaskIns64(Res, BG.V, dl, BG.RLAmt, BG.Repl32,
2731 BG.StartIdx, BG.EndIdx, InstCnt);