Home
last modified time | relevance | path

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

12

/openbsd/gnu/llvm/llvm/tools/llvm-c-test/
H A Decho.cpp244 if (!LLVMIsAConstant(Cst)) in clone_constant_impl()
253 if (LLVMIsAFunction(Cst)) { in clone_constant_impl()
307 if (LLVMIsAConstantArray(Cst) || LLVMIsAConstantDataArray(Cst)) { in clone_constant_impl()
308 check_value_kind(Cst, LLVMIsAConstantArray(Cst) in clone_constant_impl()
341 if (LLVMIsUndef(Cst)) { in clone_constant_impl()
347 if (LLVMIsPoison(Cst)) { in clone_constant_impl()
353 if (LLVMIsNull(Cst)) { in clone_constant_impl()
360 if (LLVMIsAConstantFP(Cst)) { in clone_constant_impl()
366 if (LLVMIsAConstantVector(Cst) || LLVMIsAConstantDataVector(Cst)) { in clone_constant_impl()
367 check_value_kind(Cst, LLVMIsAConstantVector(Cst) in clone_constant_impl()
[all …]
/openbsd/gnu/llvm/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.cpp157 uint64_t Cst = 0x0101010101010101UL; in applyMemSet() local
160 Cst = (Cst >> LowBits) << LowBits; in applyMemSet()
163 Cst = (Cst << HighBits) >> HighBits; in applyMemSet()
165 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
/openbsd/gnu/llvm/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()
/openbsd/gnu/llvm/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.cpp1336 return Cst.has_value(); in matchCombineConstantFoldFpUnary()
2107 APInt Cst; in matchCombineConstPtrAddToI2P() local
2421 auto Cst = in matchConstantSelectCmp() local
2423 if (!Cst) in matchConstantSelectCmp()
2425 OpIdx = Cst->isZero() ? 3 : 2; in matchConstantSelectCmp()
3040 int64_t Cst; in matchNotCmp() local
3993 if (!Cst || Cst->Value.getZExtValue() >= SrcTy.getNumElements()) in matchExtractVecEltBuildVec()
4065 if (!Cst) in matchExtractAllEltsFromBuildVector()
4067 unsigned Idx = Cst->getZExtValue(); in matchExtractAllEltsFromBuildVector()
4762 if (!Cst) in matchNarrowBinopFeedingAnd()
[all …]
H A DIRTranslator.cpp806 auto Cst = getOrCreateVReg( in emitJumpTableHeader() local
808 Cst = MIB.buildZExtOrTrunc(PtrScalarTy, Cst).getReg(0); in emitJumpTableHeader()
809 auto Cmp = MIB.buildICmp(CmpInst::ICMP_UGT, LLT::scalar(1), Sub, Cst); in emitJumpTableHeader()
2169 ConstantInt *Cst = cast<ConstantInt>(CI.getArgOperand(1)); in translateKnownIntrinsic() local
2172 ? Cst->isZero() ? TargetOpcode::G_CTTZ in translateKnownIntrinsic()
2174 : Cst->isZero() ? TargetOpcode::G_CTLZ in translateKnownIntrinsic()
H A DMachineIRBuilder.cpp212 auto Cst = buildConstant(ValueTy, Value); in materializePtrAdd() local
213 return buildPtrAdd(Res, Op0, Cst.getReg(0)); in materializePtrAdd()
/openbsd/gnu/llvm/llvm/include/llvm/CodeGen/GlobalISel/
H A DUtils.h353 int64_t Cst; variable
359 explicit RegOrConstant(int64_t Cst) : Cst(Cst), IsReg(false) {} in RegOrConstant() argument
368 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.h362 std::optional<APFloat> &Cst);
364 std::optional<APFloat> &Cst);
/openbsd/gnu/llvm/llvm/lib/Target/AArch64/GISel/
H A DAArch64PostLegalizerLowering.cpp452 auto Cst = in applyEXT() local
455 {MatchInfo.SrcOps[0], MatchInfo.SrcOps[1], Cst}); in applyEXT()
522 auto Cst = getAArch64VectorSplatScalar(*MI, MRI); in isVShiftRImm() local
523 if (!Cst) in isVShiftRImm()
525 Cnt = *Cst; in isVShiftRImm()
677 auto Cst = MIB.buildConstant(MRI.cloneVirtualRegister(RHS.getReg()), in applyAdjustICmpImmAndPred() local
680 RHS.setReg(Cst->getOperand(0).getReg()); in applyAdjustICmpImmAndPred()
774 int64_t Cst = Splat->getCst(); in matchBuildVectorToDup() local
775 return (Cst != 0 && Cst != -1); in matchBuildVectorToDup()
H A DAArch64PreLegalizerCombiner.cpp150 auto Cst = getIConstantVRegValWithLookThrough( in matchFoldGlobalOffset() local
152 if (!Cst) in matchFoldGlobalOffset()
154 MinOffset = std::min(MinOffset, Cst->Value.getZExtValue()); in matchFoldGlobalOffset()
H A DAArch64PostLegalizerCombiner.cpp60 auto Cst = getIConstantVRegValWithLookThrough(Src2, MRI); in matchExtractVecEltPairwiseAdd() local
61 if (!Cst || Cst->Value != 0) in matchExtractVecEltPairwiseAdd()
/openbsd/gnu/llvm/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.cpp780 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local
781 return Cst->isZero(); in isZero()
2009 ConstantSDNode *Cst in FoldOperand() local
2011 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
2016 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local
2017 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
/openbsd/gnu/llvm/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp1941 Constant *Cst = nullptr; in OptimizeExpression() local
1945 if (!Cst) { in OptimizeExpression()
1947 Cst = C; in OptimizeExpression()
1950 if (Constant *Res = ConstantFoldBinaryOpOperands(Opcode, C, Cst, DL)) { in OptimizeExpression()
1952 Cst = Res; in OptimizeExpression()
1960 return Cst; in OptimizeExpression()
1965 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression()
1966 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression()
1967 return Cst; in OptimizeExpression()
1968 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
H A DJumpThreading.cpp689 Constant *Cst; in computeValueKnownInPredecessorsImpl() local
690 if (!PredCst && match(V, m_Cmp(Pred, m_Value(Val), m_Constant(Cst)))) { in computeValueKnownInPredecessorsImpl()
691 auto Res = LVI->getPredicateOnEdge(Pred, Val, Cst, P, BB, CxtI); in computeValueKnownInPredecessorsImpl()
1600 if (Constant *Cst = dyn_cast<Constant>(V)) { in evaluateOnPredecessorEdge() local
1601 return Cst; in evaluateOnPredecessorEdge()
/openbsd/gnu/llvm/llvm/lib/Target/Mips/
H A DMipsISelLowering.h462 SDValue Cst = DAG.getConstant(16, DL, MVT::i32); in getAddrNonPICSym64() local
463 SDValue Shift = DAG.getNode(ISD::SHL, DL, Ty, HigherPart, Cst); in getAddrNonPICSym64()
466 SDValue Shift2 = DAG.getNode(ISD::SHL, DL, Ty, Add, Cst); in getAddrNonPICSym64()
/openbsd/gnu/llvm/llvm/lib/Target/M68k/
H A DM68kISelDAGToDAG.cpp446 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local
447 if (foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively()
/openbsd/gnu/llvm/llvm/lib/Target/X86/
H A DX86ISelDAGToDAG.cpp2212 if (auto *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local
2213 if (!foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively()
4113 auto *Cst = dyn_cast<ConstantSDNode>(N1); in tryShrinkShlLogicImm() local
4114 if (!Cst) in tryShrinkShlLogicImm()
4117 int64_t Val = Cst->getSExtValue(); in tryShrinkShlLogicImm()
4186 unsigned ZExtWidth = Cst->getAPIntValue().getActiveBits(); in tryShrinkShlLogicImm()
4192 NeededMask &= ~Cst->getAPIntValue(); in tryShrinkShlLogicImm()
5065 auto *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local
5066 if (!Cst) in Select()
5069 int64_t Val = Cst->getSExtValue(); in Select()
/openbsd/gnu/llvm/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAG.cpp350 if (auto *Cst = dyn_cast<ConstantSDNode>(Op)) in matchUnaryPredicate() local
351 return Match(Cst); in matchUnaryPredicate()
366 auto *Cst = dyn_cast<ConstantSDNode>(Op.getOperand(i)); in matchUnaryPredicate() local
367 if (!Cst || Cst->getValueType(0) != SVT || !Match(Cst)) in matchUnaryPredicate()
3439 const Constant *Cst = TLI->getTargetConstantFromLoad(LD); in computeKnownBits() local
3440 if (ISD::isNON_EXTLoad(LD) && Cst) { in computeKnownBits()
3442 Type *CstTy = Cst->getType(); in computeKnownBits()
3449 Cst = Splat; in computeKnownBits()
3450 CstTy = Cst->getType(); in computeKnownBits()
3480 if (auto *CInt = dyn_cast<ConstantInt>(Cst)) { in computeKnownBits()
[all …]
/openbsd/gnu/llvm/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp4302 if (const auto *Cst = dyn_cast<ConstantInt>(Inst->getOperand(1))) in canGetThrough() local
4303 if (!Cst->getValue().isAllOnes()) in canGetThrough()
4325 const auto *Cst = dyn_cast<ConstantInt>(AndInst->getOperand(1)); in canGetThrough() local
4326 if (Cst && in canGetThrough()
4327 Cst->getValue().isIntN(Inst->getType()->getIntegerBitWidth())) in canGetThrough()
4506 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in promoteOperandForOther() local
4509 APInt CstVal = IsSExt ? Cst->getValue().sext(BitWidth) in promoteOperandForOther()
4510 : Cst->getValue().zext(BitWidth); in promoteOperandForOther()
/openbsd/gnu/llvm/llvm/lib/Transforms/InstCombine/
H A DInstCombineCasts.cpp967 ConstantInt *Cst; in visitTrunc() local
968 if (match(Src, m_OneUse(m_ExtractElt(m_Value(VecOp), m_ConstantInt(Cst))))) { in visitTrunc()
976 uint64_t VecOpIdx = Cst->getZExtValue(); in visitTrunc()
/openbsd/gnu/llvm/llvm/lib/Target/RISCV/
H A DRISCVISelDAGToDAG.cpp611 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in tryShrinkShlLogicImm() local
612 if (!Cst) in tryShrinkShlLogicImm()
615 int64_t Val = Cst->getSExtValue(); in tryShrinkShlLogicImm()

12