Home
last modified time | relevance | path

Searched refs:MulC (Results 1 – 8 of 8) sorted by relevance

/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp1415 const APInt *MulC; in visitLShr() local
1416 if (match(Op0, m_NUWMul(m_Value(X), m_APInt(MulC)))) { in visitLShr()
1421 if (BitWidth > 2 && ShAmtC * 2 == BitWidth && (*MulC - 1).isPowerOf2() && in visitLShr()
1422 MulC->logBase2() == ShAmtC) in visitLShr()
1423 return BinaryOperator::CreateAnd(X, ConstantInt::get(Ty, *MulC - 2)); in visitLShr()
1429 APInt NewMulC = MulC->lshr(ShAmtC); in visitLShr()
1432 if (MulC->eq(NewMulC.shl(ShAmtC))) { in visitLShr()
H A DInstCombineCompares.cpp2093 const APInt *MulC; in foldICmpMulConstant() local
2094 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant()
2102 if (MulC->isNegative()) in foldICmpMulConstant()
2107 if (MulC->isZero()) in foldICmpMulConstant()
2114 if (Mul->hasNoSignedWrap() && C.srem(*MulC).isZero()) { in foldICmpMulConstant()
2115 Constant *NewC = ConstantInt::get(MulTy, C.sdiv(*MulC)); in foldICmpMulConstant()
2123 if (C.urem(*MulC).isZero()) { in foldICmpMulConstant()
2126 if ((*MulC & 1).isOne() || Mul->hasNoUnsignedWrap()) { in foldICmpMulConstant()
2127 Constant *NewC = ConstantInt::get(MulTy, C.udiv(*MulC)); in foldICmpMulConstant()
2140 if (C.isMinSignedValue() && MulC->isAllOnes()) in foldICmpMulConstant()
[all …]
H A DInstCombineMulDivRem.cpp297 Constant *MulC; in visitMul() local
298 if (match(Op1, m_ImmConstant(MulC))) { in visitMul()
305 Value *NewC = Builder.CreateMul(C1, MulC); in visitMul()
309 Value *NewMul = Builder.CreateMul(X, MulC); in visitMul()
H A DInstCombineAddSub.cpp1960 Constant *MulC; in visitFAdd() local
1961 if (match(&I, m_c_FAdd(m_FMul(m_Value(X), m_ImmConstant(MulC)), in visitFAdd()
1964 Instruction::FAdd, MulC, ConstantFP::get(I.getType(), 1.0), DL)) in visitFAdd()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp3070 const APInt *MulC; in simplifyICmpWithConstant() local
3072 ((match(LHS, m_NUWMul(m_Value(), m_APIntAllowUndef(MulC))) && in simplifyICmpWithConstant()
3073 *MulC != 0 && C->urem(*MulC) != 0) || in simplifyICmpWithConstant()
3074 (match(LHS, m_NSWMul(m_Value(), m_APIntAllowUndef(MulC))) && in simplifyICmpWithConstant()
3075 *MulC != 0 && C->srem(*MulC) != 0))) in simplifyICmpWithConstant()
/freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2845 ConstantSDNode *MulC = isConstOrConstSplat(Mul.getOperand(1)); in SimplifyDemandedBits() local
2846 if (MulC && !MulC->isOpaque() && !MulC->isZero() && in SimplifyDemandedBits()
2847 !MulC->getAPIntValue().isPowerOf2()) { in SimplifyDemandedBits()
2848 APInt UnmaskedC = MulC->getAPIntValue() | HighMask; in SimplifyDemandedBits()
H A DDAGCombiner.cpp4473 APInt MulC = ConstValue1.abs(); in visitMUL() local
4475 unsigned TZeros = MulC == 2 ? 0 : MulC.countr_zero(); in visitMUL()
4476 MulC.lshrInPlace(TZeros); in visitMUL()
4477 if ((MulC - 1).isPowerOf2()) in visitMUL()
4479 else if ((MulC + 1).isPowerOf2()) in visitMUL()
4484 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86ISelLowering.cpp3077 APInt MulC; in decomposeMulByConstant() local
3078 if (!ISD::isConstantSplatVector(C.getNode(), MulC)) in decomposeMulByConstant()
3101 return (MulC + 1).isPowerOf2() || (MulC - 1).isPowerOf2() || in decomposeMulByConstant()
3102 (1 - MulC).isPowerOf2() || (-(MulC + 1)).isPowerOf2(); in decomposeMulByConstant()
48611 const APInt &MulC = N01C->getAPIntValue(); in combineAnd() local
48613 APInt MulCLowBit = MulC & (-MulC); in combineAnd()
48614 if (MulC.uge(AndC) && !MulC.isPowerOf2() && in combineAnd()
48615 (MulCLowBit + MulC).isPowerOf2()) { in combineAnd()