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.cpp1518 const APInt *MulC; in visitLShr() local
1519 if (match(Op0, m_NUWMul(m_Value(X), m_APInt(MulC)))) { in visitLShr()
1520 if (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitLShr()
1521 MulC->logBase2() == ShAmtC) { in visitLShr()
1543 APInt NewMulC = MulC->lshr(ShAmtC); in visitLShr()
1546 if (MulC->eq(NewMulC.shl(ShAmtC))) { in visitLShr()
1558 if (match(Op0, m_OneUse(m_NSWMul(m_Value(X), m_APInt(MulC))))) { in visitLShr()
1559 if (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitLShr()
1560 MulC->logBase2() == ShAmtC) { in visitLShr()
1792 const APInt *MulC; in visitAShr() local
[all …]
H A DInstCombineCompares.cpp2198 const APInt *MulC; in foldICmpMulConstant() local
2199 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant()
2207 if (MulC->isNegative()) in foldICmpMulConstant()
2212 if (MulC->isZero()) in foldICmpMulConstant()
2219 if (Mul->hasNoSignedWrap() && C.srem(*MulC).isZero()) { in foldICmpMulConstant()
2220 Constant *NewC = ConstantInt::get(MulTy, C.sdiv(*MulC)); in foldICmpMulConstant()
2228 if (C.urem(*MulC).isZero()) { in foldICmpMulConstant()
2231 if ((*MulC & 1).isOne() || Mul->hasNoUnsignedWrap()) { in foldICmpMulConstant()
2232 Constant *NewC = ConstantInt::get(MulTy, C.udiv(*MulC)); in foldICmpMulConstant()
2245 if (C.isMinSignedValue() && MulC->isAllOnes()) in foldICmpMulConstant()
[all …]
H A DInstCombineMulDivRem.cpp324 Constant *MulC; in visitMul() local
325 if (match(Op1, m_ImmConstant(MulC))) { in visitMul()
332 Value *NewC = Builder.CreateMul(C1, MulC); in visitMul()
336 Value *NewMul = Builder.CreateMul(X, MulC); in visitMul()
H A DInstCombineAddSub.cpp2067 Constant *MulC; in visitFAdd() local
2068 if (match(&I, m_c_FAdd(m_FMul(m_Value(X), m_ImmConstant(MulC)), in visitFAdd()
2071 Instruction::FAdd, MulC, ConstantFP::get(I.getType(), 1.0), DL)) in visitFAdd()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp3020 const APInt *MulC; in simplifyICmpWithConstant() local
3022 ((match(LHS, m_NUWMul(m_Value(), m_APIntAllowPoison(MulC))) && in simplifyICmpWithConstant()
3023 *MulC != 0 && C->urem(*MulC) != 0) || in simplifyICmpWithConstant()
3024 (match(LHS, m_NSWMul(m_Value(), m_APIntAllowPoison(MulC))) && in simplifyICmpWithConstant()
3025 *MulC != 0 && C->srem(*MulC) != 0))) in simplifyICmpWithConstant()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2944 ConstantSDNode *MulC = isConstOrConstSplat(Mul.getOperand(1)); in SimplifyDemandedBits() local
2945 if (MulC && !MulC->isOpaque() && !MulC->isZero() && in SimplifyDemandedBits()
2946 !MulC->getAPIntValue().isPowerOf2()) { in SimplifyDemandedBits()
2947 APInt UnmaskedC = MulC->getAPIntValue() | HighMask; in SimplifyDemandedBits()
H A DDAGCombiner.cpp4759 APInt MulC = ConstValue1.abs(); in visitMUL() local
4761 unsigned TZeros = MulC == 2 ? 0 : MulC.countr_zero(); in visitMUL()
4762 MulC.lshrInPlace(TZeros); in visitMUL()
4763 if ((MulC - 1).isPowerOf2()) in visitMUL()
4765 else if ((MulC + 1).isPowerOf2()) in visitMUL()
4770 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86ISelLowering.cpp3343 APInt MulC; in decomposeMulByConstant() local
3344 if (!ISD::isConstantSplatVector(C.getNode(), MulC)) in decomposeMulByConstant()
3367 return (MulC + 1).isPowerOf2() || (MulC - 1).isPowerOf2() || in decomposeMulByConstant()
3368 (1 - MulC).isPowerOf2() || (-(MulC + 1)).isPowerOf2(); in decomposeMulByConstant()
51701 const APInt &MulC = N01C->getAPIntValue(); in combineAnd() local
51703 APInt MulCLowBit = MulC & (-MulC); in combineAnd()
51704 if (MulC.uge(AndC) && !MulC.isPowerOf2() && in combineAnd()
51705 (MulCLowBit + MulC).isPowerOf2()) { in combineAnd()