Home
last modified time | relevance | path

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

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp1491 const APInt *MulC; in visitLShr() local
1492 if (match(Op0, m_NUWMul(m_Value(X), m_APInt(MulC)))) { in visitLShr()
1493 if (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitLShr()
1494 MulC->logBase2() == ShAmtC) { in visitLShr()
1516 APInt NewMulC = MulC->lshr(ShAmtC); in visitLShr()
1519 if (MulC->eq(NewMulC.shl(ShAmtC))) { in visitLShr()
1531 if (match(Op0, m_OneUse(m_NSWMul(m_Value(X), m_APInt(MulC))))) { in visitLShr()
1532 if (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitLShr()
1533 MulC->logBase2() == ShAmtC) { in visitLShr()
1744 const APInt *MulC; in visitAShr() local
[all …]
H A DInstCombineCompares.cpp2153 const APInt *MulC; in foldICmpMulConstant() local
2154 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant()
2162 if (MulC->isNegative()) in foldICmpMulConstant()
2167 if (MulC->isZero()) in foldICmpMulConstant()
2174 if (Mul->hasNoSignedWrap() && C.srem(*MulC).isZero()) { in foldICmpMulConstant()
2175 Constant *NewC = ConstantInt::get(MulTy, C.sdiv(*MulC)); in foldICmpMulConstant()
2183 if (C.urem(*MulC).isZero()) { in foldICmpMulConstant()
2186 if ((*MulC & 1).isOne() || Mul->hasNoUnsignedWrap()) { in foldICmpMulConstant()
2187 Constant *NewC = ConstantInt::get(MulTy, C.udiv(*MulC)); in foldICmpMulConstant()
2200 if (C.isMinSignedValue() && MulC->isAllOnes()) in foldICmpMulConstant()
[all …]
H A DInstCombineMulDivRem.cpp303 Constant *MulC; in visitMul() local
304 if (match(Op1, m_ImmConstant(MulC))) { in visitMul()
311 Value *NewC = Builder.CreateMul(C1, MulC); in visitMul()
315 Value *NewMul = Builder.CreateMul(X, MulC); in visitMul()
H A DInstCombineAddSub.cpp1966 Constant *MulC; in visitFAdd() local
1967 if (match(&I, m_c_FAdd(m_FMul(m_Value(X), m_ImmConstant(MulC)), in visitFAdd()
1970 Instruction::FAdd, MulC, ConstantFP::get(I.getType(), 1.0), DL)) in visitFAdd()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp3070 const APInt *MulC; in simplifyICmpWithConstant() local
3072 ((match(LHS, m_NUWMul(m_Value(), m_APIntAllowPoison(MulC))) && in simplifyICmpWithConstant()
3073 *MulC != 0 && C->urem(*MulC) != 0) || in simplifyICmpWithConstant()
3074 (match(LHS, m_NSWMul(m_Value(), m_APIntAllowPoison(MulC))) && in simplifyICmpWithConstant()
3075 *MulC != 0 && C->srem(*MulC) != 0))) in simplifyICmpWithConstant()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2883 ConstantSDNode *MulC = isConstOrConstSplat(Mul.getOperand(1)); in SimplifyDemandedBits() local
2884 if (MulC && !MulC->isOpaque() && !MulC->isZero() && in SimplifyDemandedBits()
2885 !MulC->getAPIntValue().isPowerOf2()) { in SimplifyDemandedBits()
2886 APInt UnmaskedC = MulC->getAPIntValue() | HighMask; in SimplifyDemandedBits()
H A DDAGCombiner.cpp4429 APInt MulC = ConstValue1.abs(); in visitMUL() local
4431 unsigned TZeros = MulC == 2 ? 0 : MulC.countr_zero(); in visitMUL()
4432 MulC.lshrInPlace(TZeros); in visitMUL()
4433 if ((MulC - 1).isPowerOf2()) in visitMUL()
4435 else if ((MulC + 1).isPowerOf2()) in visitMUL()
4440 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86ISelLowering.cpp3167 APInt MulC; in decomposeMulByConstant() local
3168 if (!ISD::isConstantSplatVector(C.getNode(), MulC)) in decomposeMulByConstant()
3191 return (MulC + 1).isPowerOf2() || (MulC - 1).isPowerOf2() || in decomposeMulByConstant()
3192 (1 - MulC).isPowerOf2() || (-(MulC + 1)).isPowerOf2(); in decomposeMulByConstant()
49918 const APInt &MulC = N01C->getAPIntValue(); in combineAnd() local
49920 APInt MulCLowBit = MulC & (-MulC); in combineAnd()
49921 if (MulC.uge(AndC) && !MulC.isPowerOf2() && in combineAnd()
49922 (MulCLowBit + MulC).isPowerOf2()) { in combineAnd()