Home
last modified time | relevance | path

Searched refs:Cst (Results 1 – 25 of 35) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64PromoteConstant.cpp272 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 DAArch64StackTagging.cpp155 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 DMCValue.h38 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 DCSEMIRBuilder.cpp213 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 DCombinerHelper.cpp2350 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 DIRTranslator.cpp886 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 DMachineIRBuilder.cpp221 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 DUtils.h380 int64_t Cst; variable
386 explicit RegOrConstant(int64_t Cst) : Cst(Cst), IsReg(false) {} in RegOrConstant() argument
395 return Cst; in getCst()
H A DMIPatternMatch.h93 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 DCombinerHelper.h360 void applyCombineConstantFoldFpUnary(MachineInstr &MI, const ConstantFP *Cst);
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DR600ISelDAGToDAG.cpp70 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Addr)) { in SelectGlobalValueConstantOffset() local
72 CurDAG->getIntPtrConstant(Cst->getZExtValue() / 4, SDLoc(Addr), true); in SelectGlobalValueConstantOffset()
H A DR600ISelLowering.cpp778 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 DAArch64PostLegalizerLowering.cpp463 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 DAArch64PostLegalizerCombiner.cpp73 auto Cst = getIConstantVRegValWithLookThrough(Src2, MRI); in matchExtractVecEltPairwiseAdd() local
74 if (!Cst || Cst->Value != 0) in matchExtractVecEltPairwiseAdd()
H A DAArch64PreLegalizerCombiner.cpp159 auto Cst = getIConstantVRegValWithLookThrough( in matchFoldGlobalOffset() local
161 if (!Cst) in matchFoldGlobalOffset()
163 MinOffset = std::min(MinOffset, Cst->Value.getZExtValue()); in matchFoldGlobalOffset()
H A DAArch64InstructionSelector.cpp5671 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 DReassociate.cpp1978 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 DJumpThreading.cpp598 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 DMipsISelLowering.h460 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 DM68kISelDAGToDAG.cpp450 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 DX86ISelDAGToDAG.cpp2422 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 DCodeGenPrepare.cpp4444 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 DInstCombineCasts.cpp839 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 DSelectionDAG.cpp374 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 DDAGCombiner.cpp8355 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 …]

12