/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64PromoteConstant.cpp | 272 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument 338 static bool shouldConvertImpl(const Constant *Cst) { in shouldConvertImpl() argument 339 if (isa<const UndefValue>(Cst)) in shouldConvertImpl() 349 if (Cst->isZeroValue()) in shouldConvertImpl() 356 if (Cst->getType()->isVectorTy()) in shouldConvertImpl() 358 return isConstantUsingVectorTy(Cst->getType()); in shouldConvertImpl() 565 Constant *Cst = dyn_cast<Constant>(U); in runOnFunction() local 570 if (!Cst || isa<GlobalValue>(Cst) || !containsOnlyConstantData(Cst)) in runOnFunction() 574 if (!shouldConvert(*Cst, PromotionCache)) in runOnFunction() 579 if (!shouldConvertUse(Cst, &I, OpNo)) in runOnFunction() [all …]
|
H A D | AArch64StackTagging.cpp | 155 uint64_t Cst = 0x0101010101010101UL; in applyMemSet() local 158 Cst = (Cst >> LowBits) << LowBits; in applyMemSet() 161 Cst = (Cst << HighBits) >> HighBits; in applyMemSet() 163 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/MC/ |
H A D | MCValue.h | 38 int64_t Cst = 0; variable 43 int64_t getConstant() const { return Cst; } in getConstant() 63 R.Cst = Val; 72 R.Cst = Val; in get()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | CSEMIRBuilder.cpp | 213 if (std::optional<APInt> Cst = ConstantFoldBinOp( in buildInstr() local 215 return buildConstant(DstOps[0], *Cst); in buildInstr() 233 if (std::optional<APFloat> Cst = ConstantFoldFPBinOp( in buildInstr() local 235 return buildFConstant(DstOps[0], *Cst); in buildInstr() 254 if (std::optional<APFloat> Cst = ConstantFoldIntToFloat( in buildInstr() local 256 return buildFConstant(DstOps[0], *Cst); in buildInstr() 270 for (unsigned Cst : *MaybeCsts) in buildInstr() 272 buildConstant(VecTy.getScalarType(), Cst).getReg(0)); in buildInstr()
|
H A D | CombinerHelper.cpp | 2350 APInt Cst; in matchCombineConstPtrAddToI2P() local 2641 auto Cst = in matchConstantSelectCmp() local 2643 if (!Cst) in matchConstantSelectCmp() 2645 OpIdx = Cst->isZero() ? 3 : 2; in matchConstantSelectCmp() 3308 int64_t Cst; in matchNotCmp() local 3317 if (!mi_match(CstReg, MRI, m_ICst(Cst))) in matchNotCmp() 3989 if (!Cst || Cst->Value.getZExtValue() >= SrcTy.getNumElements()) in matchExtractVecEltBuildVec() 4061 if (!Cst) in matchExtractAllEltsFromBuildVector() 4063 unsigned Idx = Cst->getZExtValue(); in matchExtractAllEltsFromBuildVector() 4857 if (!Cst) in matchNarrowBinopFeedingAnd() [all …]
|
H A D | IRTranslator.cpp | 886 auto Cst = getOrCreateVReg( in emitJumpTableHeader() local 888 Cst = MIB.buildZExtOrTrunc(PtrScalarTy, Cst).getReg(0); in emitJumpTableHeader() 889 auto Cmp = MIB.buildICmp(CmpInst::ICMP_UGT, LLT::scalar(1), Sub, Cst); in emitJumpTableHeader() 2280 ConstantInt *Cst = cast<ConstantInt>(CI.getArgOperand(1)); in translateKnownIntrinsic() local 2283 ? Cst->isZero() ? TargetOpcode::G_CTTZ in translateKnownIntrinsic() 2285 : Cst->isZero() ? TargetOpcode::G_CTLZ in translateKnownIntrinsic()
|
H A D | MachineIRBuilder.cpp | 221 auto Cst = buildConstant(ValueTy, Value); in materializePtrAdd() local 222 return buildPtrAdd(Res, Op0, Cst.getReg(0)); in materializePtrAdd()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
H A D | Utils.h | 380 int64_t Cst; variable 386 explicit RegOrConstant(int64_t Cst) : Cst(Cst), IsReg(false) {} in RegOrConstant() argument 395 return Cst; in getCst()
|
H A D | MIPatternMatch.h | 93 inline ConstantMatch<APInt> m_ICst(APInt &Cst) { in m_ICst() argument 94 return ConstantMatch<APInt>(Cst); in m_ICst() 96 inline ConstantMatch<int64_t> m_ICst(int64_t &Cst) { in m_ICst() argument 97 return ConstantMatch<int64_t>(Cst); in m_ICst() 134 inline ICstOrSplatMatch<APInt> m_ICstOrSplat(APInt &Cst) { in m_ICstOrSplat() argument 135 return ICstOrSplatMatch<APInt>(Cst); in m_ICstOrSplat() 138 inline ICstOrSplatMatch<int64_t> m_ICstOrSplat(int64_t &Cst) { in m_ICstOrSplat() argument 139 return ICstOrSplatMatch<int64_t>(Cst); in m_ICstOrSplat()
|
H A D | CombinerHelper.h | 360 void applyCombineConstantFoldFpUnary(MachineInstr &MI, const ConstantFP *Cst);
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | R600ISelDAGToDAG.cpp | 70 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Addr)) { in SelectGlobalValueConstantOffset() local 72 CurDAG->getIntPtrConstant(Cst->getZExtValue() / 4, SDLoc(Addr), true); in SelectGlobalValueConstantOffset()
|
H A D | R600ISelLowering.cpp | 778 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local 779 return Cst->isZero(); in isZero() 2008 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 2009 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/ |
H A D | AArch64PostLegalizerLowering.cpp | 463 auto Cst = in applyEXT() local 466 {MatchInfo.SrcOps[0], MatchInfo.SrcOps[1], Cst}); in applyEXT() 532 auto Cst = getAArch64VectorSplatScalar(*MI, MRI); in isVShiftRImm() local 533 if (!Cst) in isVShiftRImm() 535 Cnt = *Cst; in isVShiftRImm() 686 auto Cst = MIB.buildConstant(MRI.cloneVirtualRegister(RHS.getReg()), in applyAdjustICmpImmAndPred() local 689 RHS.setReg(Cst->getOperand(0).getReg()); in applyAdjustICmpImmAndPred() 803 int64_t Cst = Splat->getCst(); in matchBuildVectorToDup() local 804 return (Cst != 0 && Cst != -1); in matchBuildVectorToDup()
|
H A D | AArch64PostLegalizerCombiner.cpp | 73 auto Cst = getIConstantVRegValWithLookThrough(Src2, MRI); in matchExtractVecEltPairwiseAdd() local 74 if (!Cst || Cst->Value != 0) in matchExtractVecEltPairwiseAdd()
|
H A D | AArch64PreLegalizerCombiner.cpp | 159 auto Cst = getIConstantVRegValWithLookThrough( in matchFoldGlobalOffset() local 161 if (!Cst) in matchFoldGlobalOffset() 163 MinOffset = std::min(MinOffset, Cst->Value.getZExtValue()); in matchFoldGlobalOffset()
|
H A D | AArch64InstructionSelector.cpp | 5671 auto Cst = getIConstantVRegVal(Offset, MRI); in selectIndexedExtLoad() local 5672 if (!Cst) in selectIndexedExtLoad() 5676 .addImm(Cst->getSExtValue()); in selectIndexedExtLoad() 5736 auto Cst = getIConstantVRegVal(Offset, MRI); in selectIndexedLoad() local 5737 if (!Cst) in selectIndexedLoad() 5740 MIB.buildInstr(Opc, {WriteBack, Dst}, {Base}).addImm(Cst->getSExtValue()); in selectIndexedLoad() 5783 auto Cst = getIConstantVRegVal(Offset, MRI); in selectIndexedStore() local 5784 if (!Cst) in selectIndexedStore() 5787 MIB.buildInstr(Opc, {Dst}, {Val, Base}).addImm(Cst->getSExtValue()); in selectIndexedStore()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | Reassociate.cpp | 1978 Constant *Cst = nullptr; in OptimizeExpression() local 1982 if (!Cst) { in OptimizeExpression() 1984 Cst = C; in OptimizeExpression() 1987 if (Constant *Res = ConstantFoldBinaryOpOperands(Opcode, C, Cst, DL)) { in OptimizeExpression() 1989 Cst = Res; in OptimizeExpression() 1997 return Cst; in OptimizeExpression() 2002 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 2003 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 2004 return Cst; in OptimizeExpression() 2005 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
H A D | JumpThreading.cpp | 598 Constant *Cst; in computeValueKnownInPredecessorsImpl() local 599 if (!PredCst && match(V, m_Cmp(Pred, m_Value(Val), m_Constant(Cst)))) { in computeValueKnownInPredecessorsImpl() 600 auto Res = LVI->getPredicateOnEdge(Pred, Val, Cst, P, BB, CxtI); in computeValueKnownInPredecessorsImpl() 1519 if (Constant *Cst = dyn_cast<Constant>(V)) { in evaluateOnPredecessorEdge() local 1520 return Cst; in evaluateOnPredecessorEdge()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
H A D | MipsISelLowering.h | 460 SDValue Cst = DAG.getConstant(16, DL, MVT::i32); in getAddrNonPICSym64() local 461 SDValue Shift = DAG.getNode(ISD::SHL, DL, Ty, HigherPart, Cst); in getAddrNonPICSym64() 464 SDValue Shift2 = DAG.getNode(ISD::SHL, DL, Ty, Add, Cst); in getAddrNonPICSym64()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/M68k/ |
H A D | M68kISelDAGToDAG.cpp | 450 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 451 if (foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
H A D | X86ISelDAGToDAG.cpp | 2422 if (auto *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 2423 if (!foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively() 4355 auto *Cst = dyn_cast<ConstantSDNode>(N1); in tryShrinkShlLogicImm() local 4356 if (!Cst) in tryShrinkShlLogicImm() 4359 int64_t Val = Cst->getSExtValue(); in tryShrinkShlLogicImm() 4428 unsigned ZExtWidth = Cst->getAPIntValue().getActiveBits(); in tryShrinkShlLogicImm() 4434 NeededMask &= ~Cst->getAPIntValue(); in tryShrinkShlLogicImm() 5310 auto *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local 5311 if (!Cst) in Select() 5314 int64_t Val = Cst->getSExtValue(); in Select()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | CodeGenPrepare.cpp | 4444 if (const auto *Cst = dyn_cast<ConstantInt>(Inst->getOperand(1))) in canGetThrough() local 4445 if (!Cst->getValue().isAllOnes()) in canGetThrough() 4467 const auto *Cst = dyn_cast<ConstantInt>(AndInst->getOperand(1)); in canGetThrough() local 4468 if (Cst && in canGetThrough() 4469 Cst->getValue().isIntN(Inst->getType()->getIntegerBitWidth())) in canGetThrough() 4646 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in promoteOperandForOther() local 4649 APInt CstVal = IsSExt ? Cst->getValue().sext(BitWidth) in promoteOperandForOther() 4650 : Cst->getValue().zext(BitWidth); in promoteOperandForOther()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineCasts.cpp | 839 ConstantInt *Cst; in visitTrunc() local 840 if (match(Src, m_OneUse(m_ExtractElt(m_Value(VecOp), m_ConstantInt(Cst))))) { in visitTrunc() 848 uint64_t VecOpIdx = Cst->getZExtValue(); in visitTrunc()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
H A D | SelectionDAG.cpp | 374 auto *Cst = dyn_cast<ConstNodeType>(Op.getOperand(i)); in matchUnaryPredicateImpl() local 375 if (!Cst || Cst->getValueType(0) != SVT || !Match(Cst)) in matchUnaryPredicateImpl() 3567 const Constant *Cst = TLI->getTargetConstantFromLoad(LD); in computeKnownBits() local 3568 if (ISD::isNON_EXTLoad(LD) && Cst) { in computeKnownBits() 3570 Type *CstTy = Cst->getType(); in computeKnownBits() 3576 if (const Constant *Splat = Cst->getSplatValue()) { in computeKnownBits() 3577 Cst = Splat; in computeKnownBits() 3578 CstTy = Cst->getType(); in computeKnownBits() 3608 if (auto *CInt = dyn_cast<ConstantInt>(Cst)) { in computeKnownBits() 3610 } else if (auto *CFP = dyn_cast<ConstantFP>(Cst)) { in computeKnownBits() [all …]
|
H A D | DAGCombiner.cpp | 8355 return Cst && (Cst->getAPIntValue() == Imm); in MatchFunnelPosNeg() 10787 if (Cst->getAPIntValue().uge(BitWidth)) { in visitFunnelShift() 10793 unsigned ShAmt = Cst->getZExtValue(); in visitFunnelShift() 15300 AddToWorklist(Cst.getNode()); in visitBITCAST() 15325 Cst = DAG.getNode(ISD::AND, SDLoc(Cst), VT, in visitBITCAST() 15326 Cst, DAG.getConstant(~SignBit, SDLoc(Cst), VT)); in visitBITCAST() 15327 AddToWorklist(Cst.getNode()); in visitBITCAST() 21163 if (!Cst->isOpaque()) { in visitSTORE() 21164 const APInt &CValue = Cst->getAPIntValue(); in visitSTORE() 23298 if (auto *Cst = dyn_cast<ConstantSDNode>(Op)) { in convertBuildVecZextToBuildVecWithZeros() local [all …]
|