Searched refs:MulC (Results 1 – 7 of 7) sorted by relevance
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 1230 const APInt *MulC; in visitLShr() local 1231 if (match(Op0, m_NUWMul(m_Value(X), m_APInt(MulC)))) { in visitLShr() 1236 if (BitWidth > 2 && ShAmtC * 2 == BitWidth && (*MulC - 1).isPowerOf2() && in visitLShr() 1237 MulC->logBase2() == ShAmtC) in visitLShr() 1238 return BinaryOperator::CreateAnd(X, ConstantInt::get(Ty, *MulC - 2)); in visitLShr() 1244 APInt NewMulC = MulC->lshr(ShAmtC); in visitLShr() 1247 if (MulC->eq(NewMulC.shl(ShAmtC))) { in visitLShr()
|
| H A D | InstCombineCompares.cpp | 1991 const APInt *MulC; in foldICmpMulConstant() local 1992 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant() 1999 if (MulC->isNegative()) in foldICmpMulConstant() 2012 if (Mul->hasNoSignedWrap() && C.srem(*MulC).isZero()) { in foldICmpMulConstant() 2017 if (Mul->hasNoUnsignedWrap() && C.urem(*MulC).isZero()) { in foldICmpMulConstant() 2029 if (MulC->isNegative()) { in foldICmpMulConstant() 2031 if (C.isMinSignedValue() && MulC->isAllOnes()) in foldICmpMulConstant() 2038 APIntOps::RoundingSDiv(C, *MulC, APInt::Rounding::UP)); in foldICmpMulConstant() 2042 APIntOps::RoundingSDiv(C, *MulC, APInt::Rounding::DOWN)); in foldICmpMulConstant() 2047 APIntOps::RoundingUDiv(C, *MulC, APInt::Rounding::UP)); in foldICmpMulConstant() [all …]
|
| H A D | InstCombineAddSub.cpp | 1660 Constant *MulC; in visitFAdd() local 1661 if (match(&I, m_c_FAdd(m_FMul(m_Value(X), m_ImmConstant(MulC)), in visitFAdd() 1664 Instruction::FAdd, MulC, ConstantFP::get(I.getType(), 1.0), DL)) in visitFAdd()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | InstructionSimplify.cpp | 3004 const APInt *MulC; in simplifyICmpWithConstant() local 3006 ((match(LHS, m_NUWMul(m_Value(), m_APIntAllowUndef(MulC))) && in simplifyICmpWithConstant() 3007 *MulC != 0 && C->urem(*MulC) != 0) || in simplifyICmpWithConstant() 3008 (match(LHS, m_NSWMul(m_Value(), m_APIntAllowUndef(MulC))) && in simplifyICmpWithConstant() 3009 *MulC != 0 && C->srem(*MulC) != 0))) in simplifyICmpWithConstant()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | TargetLowering.cpp | 2648 ConstantSDNode *MulC = isConstOrConstSplat(Mul.getOperand(1)); in SimplifyDemandedBits() local 2649 if (MulC && !MulC->isOpaque() && !MulC->isZero() && in SimplifyDemandedBits() 2650 !MulC->getAPIntValue().isPowerOf2()) { in SimplifyDemandedBits() 2651 APInt UnmaskedC = MulC->getAPIntValue() | HighMask; in SimplifyDemandedBits()
|
| H A D | DAGCombiner.cpp | 4044 APInt MulC = ConstValue1.abs(); in visitMUL() local 4046 unsigned TZeros = MulC == 2 ? 0 : MulC.countTrailingZeros(); in visitMUL() 4047 MulC.lshrInPlace(TZeros); in visitMUL() 4048 if ((MulC - 1).isPowerOf2()) in visitMUL() 4050 else if ((MulC + 1).isPowerOf2()) in visitMUL() 4055 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86ISelLowering.cpp | 5755 APInt MulC; in decomposeMulByConstant() local 5756 if (!ISD::isConstantSplatVector(C.getNode(), MulC)) in decomposeMulByConstant() 5779 return (MulC + 1).isPowerOf2() || (MulC - 1).isPowerOf2() || in decomposeMulByConstant() 5780 (1 - MulC).isPowerOf2() || (-(MulC + 1)).isPowerOf2(); in decomposeMulByConstant()
|