Lines Matching defs:MOps
203 static bool matchAndOrChain(Value *V, MaskOps &MOps) {
205 if (MOps.MatchAndChain) {
210 MOps.FoundAnd1 = true;
211 return matchAndOrChain(Op0, MOps);
214 return matchAndOrChain(Op0, MOps) && matchAndOrChain(Op1, MOps);
218 return matchAndOrChain(Op0, MOps) && matchAndOrChain(Op1, MOps);
229 if (!MOps.Root)
230 MOps.Root = Candidate;
233 if (BitIndex && BitIndex->uge(MOps.Mask.getBitWidth()))
237 MOps.Mask.setBit(BitIndex ? BitIndex->getZExtValue() : 0);
238 return MOps.Root == Candidate;
260 MaskOps MOps(I.getType()->getScalarSizeInBits(), MatchAllBitsSet);
262 if (!matchAndOrChain(cast<BinaryOperator>(&I), MOps) || !MOps.FoundAnd1)
265 if (!matchAndOrChain(cast<BinaryOperator>(&I)->getOperand(0), MOps))
272 Constant *Mask = ConstantInt::get(I.getType(), MOps.Mask);
273 Value *And = Builder.CreateAnd(MOps.Root, Mask);