| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64PromoteConstant.cpp | 268 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument 334 static bool shouldConvertImpl(const Constant *Cst) { in shouldConvertImpl() argument 335 if (isa<const UndefValue>(Cst)) in shouldConvertImpl() 345 if (Cst->isZeroValue()) in shouldConvertImpl() 349 if (Cst->getType()->isScalableTy()) 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() [all …]
|
| H A D | AArch64StackTagging.cpp | 166 uint64_t Cst = 0x0101010101010101UL; in applyMemSet() local 169 Cst = (Cst >> LowBits) << LowBits; in applyMemSet() 172 Cst = (Cst << HighBits) >> HighBits; in applyMemSet() 174 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/MC/ |
| H A D | MCValue.h | 32 int64_t Cst = 0; variable 44 int64_t getConstant() const { return Cst; } in getConstant() 45 void setConstant(int64_t C) { Cst = C; } in setConstant() 59 R.Cst = Val; 68 R.Cst = Val; in get()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CSEMIRBuilder.cpp | 193 if (std::optional<SmallVector<APInt>> Cst = ConstantFoldICmp( in buildInstr() local 197 return buildBuildVectorConstant(DstOps[0], *Cst); in buildInstr() 198 return buildConstant(DstOps[0], Cst->front()); in buildInstr() 238 if (std::optional<APInt> Cst = ConstantFoldBinOp( in buildInstr() local 240 return buildConstant(DstOps[0], *Cst); in buildInstr() 258 if (std::optional<APFloat> Cst = ConstantFoldFPBinOp( in buildInstr() local 260 return buildFConstant(DstOps[0], *Cst); in buildInstr() 279 if (std::optional<APFloat> Cst = ConstantFoldIntToFloat( in buildInstr() local 281 return buildFConstant(DstOps[0], *Cst); in buildInstr() 301 for (unsigned Cst : *MaybeCsts) in buildInstr() [all …]
|
| H A D | CombinerHelper.cpp | 1762 MachineInstr &MI, const ConstantFP *Cst) const { in applyCombineConstantFoldFpUnary() 1763 APFloat Folded = constantFoldFpUnary(MI, MRI, Cst->getValue()); in applyCombineConstantFoldFpUnary() 2587 APInt Cst; in matchCombineConstPtrAddToI2P() local 2588 if (mi_match(LHS, MRI, m_GIntToPtr(m_ICst(Cst)))) { in matchCombineConstPtrAddToI2P() 2591 NewCst = Cst.zextOrTrunc(DstTy.getSizeInBits()); in matchCombineConstPtrAddToI2P() 2794 auto Cst = in matchConstantSelectCmp() local 2796 if (!Cst) in matchConstantSelectCmp() 2798 OpIdx = Cst->isZero() ? 3 : 2; in matchConstantSelectCmp() 3425 int64_t Cst, bool IsVector, bool IsFP) { in isConstValidTrue() argument 3427 return (ScalarSizeBits == 1 && Cst == -1) || in isConstValidTrue() [all …]
|
| H A D | GISelValueTracking.cpp | 770 if (auto Cst = GFConstant::getConstant(R, MRI)) { in computeKnownFPClass() local 771 switch (Cst->getKind()) { in computeKnownFPClass() 773 auto APF = Cst->getScalarValue(); in computeKnownFPClass() 783 for (auto C : *Cst) { in computeKnownFPClass()
|
| H A D | IRTranslator.cpp | 898 auto Cst = getOrCreateVReg( in emitJumpTableHeader() local 900 Cst = MIB.buildZExtOrTrunc(PtrScalarTy, Cst).getReg(0); in emitJumpTableHeader() 901 auto Cmp = MIB.buildICmp(CmpInst::ICMP_UGT, LLT::scalar(1), Sub, Cst); in emitJumpTableHeader() 2429 ConstantInt *Cst = cast<ConstantInt>(CI.getArgOperand(1)); in translateKnownIntrinsic() local 2432 ? Cst->isZero() ? TargetOpcode::G_CTTZ in translateKnownIntrinsic() 2434 : Cst->isZero() ? TargetOpcode::G_CTLZ in translateKnownIntrinsic()
|
| /freebsd/contrib/llvm-project/llvm/lib/MC/ |
| H A D | MCExpr.cpp | 614 RHSValue.Cst = -(uint64_t)RHSValue.Cst; in evaluateAsRelocatableImpl() 617 LHSValue.Cst += RHSValue.Cst; in evaluateAsRelocatableImpl() 622 RHSValue.Cst += LHSValue.Cst; in evaluateAsRelocatableImpl()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
| H A D | Utils.h | 408 int64_t Cst; variable 414 explicit RegOrConstant(int64_t Cst) : Cst(Cst), IsReg(false) {} in RegOrConstant() argument 423 return Cst; in getCst()
|
| H A D | MIPatternMatch.h | 102 inline ConstantMatch<APInt> m_ICst(APInt &Cst) { in m_ICst() argument 103 return ConstantMatch<APInt>(Cst); in m_ICst() 105 inline ConstantMatch<int64_t> m_ICst(int64_t &Cst) { in m_ICst() argument 106 return ConstantMatch<int64_t>(Cst); in m_ICst() 143 inline ICstOrSplatMatch<APInt> m_ICstOrSplat(APInt &Cst) { in m_ICstOrSplat() argument 144 return ICstOrSplatMatch<APInt>(Cst); in m_ICstOrSplat() 147 inline ICstOrSplatMatch<int64_t> m_ICstOrSplat(int64_t &Cst) { in m_ICstOrSplat() argument 148 return ICstOrSplatMatch<int64_t>(Cst); in m_ICstOrSplat()
|
| H A D | CombinerHelper.h | 393 const ConstantFP *Cst) const;
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | R600ISelDAGToDAG.cpp | 82 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Addr)) { in SelectGlobalValueConstantOffset() local 84 CurDAG->getIntPtrConstant(Cst->getZExtValue() / 4, SDLoc(Addr), true); in SelectGlobalValueConstantOffset()
|
| H A D | R600ISelLowering.cpp | 782 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) in isZero() local 783 return Cst->isZero(); in isZero() 2011 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 2012 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/ |
| H A D | AArch64PostLegalizerLowering.cpp | 399 auto Cst = in applyEXT() local 402 {MatchInfo.SrcOps[0], MatchInfo.SrcOps[1], Cst}); in applyEXT() 414 auto Cst = MIRBuilder.buildConstant(LLT::scalar(32), 8); in applyFullRev() local 416 MIRBuilder.buildInstr(AArch64::G_EXT, {Dst}, {Rev, Rev, Cst}); in applyFullRev() 533 auto Cst = getAArch64VectorSplatScalar(*MI, MRI); in isVShiftRImm() local 534 if (!Cst) in isVShiftRImm() 536 Cnt = *Cst; in isVShiftRImm() 699 auto Cst = MIB.buildConstant(MRI.cloneVirtualRegister(RHS.getReg()), in applyAdjustICmpImmAndPred() local 702 RHS.setReg(Cst->getOperand(0).getReg()); in applyAdjustICmpImmAndPred()
|
| H A D | AArch64PreLegalizerCombiner.cpp | 158 auto Cst = getIConstantVRegValWithLookThrough( in matchFoldGlobalOffset() local 160 if (!Cst) in matchFoldGlobalOffset() 162 MinOffset = std::min(MinOffset, Cst->Value.getZExtValue()); in matchFoldGlobalOffset()
|
| 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 | AArch64InstructionSelector.cpp | 5619 auto Cst = getIConstantVRegVal(Offset, MRI); in selectIndexedExtLoad() local 5620 if (!Cst) in selectIndexedExtLoad() 5624 .addImm(Cst->getSExtValue()); in selectIndexedExtLoad() 5687 auto Cst = getIConstantVRegVal(Offset, MRI); in selectIndexedLoad() local 5688 if (!Cst) in selectIndexedLoad() 5691 MIB.buildInstr(Opc, {WriteBack, Dst}, {Base}).addImm(Cst->getSExtValue()); in selectIndexedLoad() 5734 auto Cst = getIConstantVRegVal(Offset, MRI); in selectIndexedStore() local 5735 if (!Cst) in selectIndexedStore() 5738 MIB.buildInstr(Opc, {Dst}, {Val, Base}).addImm(Cst->getSExtValue()); in selectIndexedStore()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | Reassociate.cpp | 1896 Constant *Cst = nullptr; in OptimizeExpression() local 1900 if (!Cst) { in OptimizeExpression() 1902 Cst = C; in OptimizeExpression() 1905 if (Constant *Res = ConstantFoldBinaryOpOperands(Opcode, C, Cst, DL)) { in OptimizeExpression() 1907 Cst = Res; in OptimizeExpression() 1915 return Cst; in OptimizeExpression() 1920 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1921 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1922 return Cst; in OptimizeExpression() 1923 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
| H A D | JumpThreading.cpp | 595 Constant *Cst; in computeValueKnownInPredecessorsImpl() local 596 if (!PredCst && match(V, m_Cmp(Pred, m_Value(Val), m_Constant(Cst)))) in computeValueKnownInPredecessorsImpl() 597 PredCst = LVI->getPredicateOnEdge(Pred, Val, Cst, P, BB, CxtI); in computeValueKnownInPredecessorsImpl() 1512 if (Constant *Cst = dyn_cast<Constant>(V)) { in evaluateOnPredecessorEdge() local 1513 return Cst; in evaluateOnPredecessorEdge()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
| H A D | MipsISelLowering.h | 468 SDValue Cst = DAG.getConstant(16, DL, MVT::i32); in getAddrNonPICSym64() local 469 SDValue Shift = DAG.getNode(ISD::SHL, DL, Ty, HigherPart, Cst); in getAddrNonPICSym64() 472 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 | 455 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 456 if (foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86ISelDAGToDAG.cpp | 2533 if (auto *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 2534 if (!foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively() 4484 auto *Cst = dyn_cast<ConstantSDNode>(N1); in tryShrinkShlLogicImm() local 4485 if (!Cst) in tryShrinkShlLogicImm() 4488 int64_t Val = Cst->getSExtValue(); in tryShrinkShlLogicImm() 4557 unsigned ZExtWidth = Cst->getAPIntValue().getActiveBits(); in tryShrinkShlLogicImm() 4563 NeededMask &= ~Cst->getAPIntValue(); in tryShrinkShlLogicImm() 5543 auto *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local 5544 if (!Cst) in Select() 5547 int64_t Val = Cst->getSExtValue(); in Select()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCasts.cpp | 476 ConstantInt *Cst; in foldVecExtTruncToExtElt() local 478 if (!match(Src, m_OneUse(m_ExtractElt(m_Value(VecOp), m_ConstantInt(Cst)))) && in foldVecExtTruncToExtElt() 480 m_OneUse(m_LShr(m_ExtractElt(m_Value(VecOp), m_ConstantInt(Cst)), in foldVecExtTruncToExtElt() 488 uint64_t VecOpIdx = Cst->getZExtValue(); in foldVecExtTruncToExtElt()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | SelectionDAG.cpp | 372 auto *Cst = dyn_cast<ConstNodeType>(Op.getOperand(i)); in matchUnaryPredicateImpl() local 373 if (!Cst || (!AllowTruncation && Cst->getValueType(0) != SVT) || in matchUnaryPredicateImpl() 374 !Match(Cst)) in matchUnaryPredicateImpl() 3269 if (auto *Cst = dyn_cast<ConstantSDNode>(V.getOperand(1))) { in getValidShiftAmountRange() local 3270 const APInt &ShAmt = Cst->getAPIntValue(); in getValidShiftAmountRange() 3972 const Constant *Cst = TLI->getTargetConstantFromLoad(LD); in computeKnownBits() local 3973 if (ISD::isNON_EXTLoad(LD) && Cst) { in computeKnownBits() 3975 Type *CstTy = Cst->getType(); in computeKnownBits() 3981 if (const Constant *Splat = Cst->getSplatValue()) { in computeKnownBits() 3982 Cst = Splat; in computeKnownBits() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 4875 if (const auto *Cst = dyn_cast<ConstantInt>(Inst->getOperand(1))) in canGetThrough() local 4876 if (!Cst->getValue().isAllOnes()) in canGetThrough() 4898 const auto *Cst = dyn_cast<ConstantInt>(AndInst->getOperand(1)); in canGetThrough() local 4899 if (Cst && in canGetThrough() 4900 Cst->getValue().isIntN(Inst->getType()->getIntegerBitWidth())) in canGetThrough() 5077 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in promoteOperandForOther() local 5080 APInt CstVal = IsSExt ? Cst->getValue().sext(BitWidth) in promoteOperandForOther() 5081 : Cst->getValue().zext(BitWidth); in promoteOperandForOther()
|