Lines Matching refs:MOps
190 static bool matchAndOrChain(Value *V, MaskOps &MOps) { in matchAndOrChain() argument
192 if (MOps.MatchAndChain) { in matchAndOrChain()
197 MOps.FoundAnd1 = true; in matchAndOrChain()
198 return matchAndOrChain(Op0, MOps); in matchAndOrChain()
201 return matchAndOrChain(Op0, MOps) && matchAndOrChain(Op1, MOps); in matchAndOrChain()
205 return matchAndOrChain(Op0, MOps) && matchAndOrChain(Op1, MOps); in matchAndOrChain()
216 if (!MOps.Root) in matchAndOrChain()
217 MOps.Root = Candidate; in matchAndOrChain()
220 if (BitIndex && BitIndex->uge(MOps.Mask.getBitWidth())) in matchAndOrChain()
224 MOps.Mask.setBit(BitIndex ? BitIndex->getZExtValue() : 0); in matchAndOrChain()
225 return MOps.Root == Candidate; in matchAndOrChain()
247 MaskOps MOps(I.getType()->getScalarSizeInBits(), MatchAllBitsSet); in foldAnyOrAllBitsSet() local
249 if (!matchAndOrChain(cast<BinaryOperator>(&I), MOps) || !MOps.FoundAnd1) in foldAnyOrAllBitsSet()
252 if (!matchAndOrChain(cast<BinaryOperator>(&I)->getOperand(0), MOps)) in foldAnyOrAllBitsSet()
259 Constant *Mask = ConstantInt::get(I.getType(), MOps.Mask); in foldAnyOrAllBitsSet()
260 Value *And = Builder.CreateAnd(MOps.Root, Mask); in foldAnyOrAllBitsSet()