| /llvm-project-15.0.7/llvm/tools/llvm-c-test/ |
| H A D | echo.cpp | 242 if (!LLVMIsAConstant(Cst)) in clone_constant_impl() 251 if (LLVMIsAFunction(Cst)) { in clone_constant_impl() 305 if (LLVMIsAConstantArray(Cst) || LLVMIsAConstantDataArray(Cst)) { in clone_constant_impl() 306 check_value_kind(Cst, LLVMIsAConstantArray(Cst) in clone_constant_impl() 339 if (LLVMIsUndef(Cst)) { in clone_constant_impl() 345 if (LLVMIsPoison(Cst)) { in clone_constant_impl() 351 if (LLVMIsNull(Cst)) { in clone_constant_impl() 358 if (LLVMIsAConstantFP(Cst)) { in clone_constant_impl() 364 if (LLVMIsAConstantVector(Cst) || LLVMIsAConstantDataVector(Cst)) { in clone_constant_impl() 365 check_value_kind(Cst, LLVMIsAConstantVector(Cst) in clone_constant_impl() [all …]
|
| /llvm-project-15.0.7/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 | 159 uint64_t Cst = 0x0101010101010101UL; in applyMemSet() local 162 Cst = (Cst >> LowBits) << LowBits; in applyMemSet() 165 Cst = (Cst << HighBits) >> HighBits; in applyMemSet() 167 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
|
| /llvm-project-15.0.7/llvm/unittests/CodeGen/GlobalISel/ |
| H A D | ConstantFoldingTest.cpp | 27 int64_t Cst; in TEST_F() local 31 bool match = mi_match(MIBCAdd.getReg(0), *MRI, m_ICst(Cst)); in TEST_F() 33 EXPECT_EQ(Cst, 1); in TEST_F() 38 match = mi_match(MIBCAdd1.getReg(0), *MRI, m_ICst(Cst)); in TEST_F() 40 EXPECT_EQ(Cst, 1); in TEST_F() 50 match = mi_match(MIBCSub.getReg(0), *MRI, m_ICst(Cst)); in TEST_F() 52 EXPECT_EQ(Cst, 0); in TEST_F() 58 match = mi_match(MIBCSext1.getReg(0), *MRI, m_ICst(Cst)); in TEST_F() 60 EXPECT_EQ(1, Cst); in TEST_F() 66 match = mi_match(MIBCSext2.getReg(0), *MRI, m_ICst(Cst)); in TEST_F() [all …]
|
| H A D | PatternMatchTest.cpp | 37 int64_t Cst; in TEST_F() local 40 EXPECT_EQ(Cst, 42); in TEST_F() 64 int64_t Cst; in TEST_F() local 66 EXPECT_EQ(Cst, 42); in TEST_F() 145 int64_t Cst; in TEST_F() local 147 m_GMul(m_ICst(Cst), m_Reg(Src0))); in TEST_F() 149 EXPECT_EQ(Cst, 42); in TEST_F() 164 EXPECT_EQ(Cst, 42); in TEST_F() 227 EXPECT_EQ(Cst, 42); in TEST_F() 252 EXPECT_EQ(Cst, 42); in TEST_F() [all …]
|
| /llvm-project-15.0.7/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()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CSEMIRBuilder.cpp | 213 if (Optional<APInt> Cst = ConstantFoldBinOp(Opc, SrcOps[0].getReg(), in buildInstr() local 215 return buildConstant(DstOps[0], *Cst); in buildInstr() 233 if (Optional<APFloat> Cst = ConstantFoldFPBinOp( in buildInstr() local 235 return buildFConstant(DstOps[0], *Cst); in buildInstr() 254 if (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 | 1317 return Cst.has_value(); in matchCombineConstantFoldFpUnary() 2088 APInt Cst; in matchCombineConstPtrAddToI2P() local 2337 auto Cst = in matchConstantSelectCmp() local 2339 if (!Cst) in matchConstantSelectCmp() 2341 OpIdx = Cst->isZero() ? 3 : 2; in matchConstantSelectCmp() 2968 int64_t Cst; in matchNotCmp() local 3925 if (!Cst || Cst->Value.getZExtValue() >= SrcTy.getNumElements()) in matchExtractVecEltBuildVec() 3997 if (!Cst) in matchExtractAllEltsFromBuildVector() 3999 unsigned Idx = Cst->getZExtValue(); in matchExtractAllEltsFromBuildVector() 4692 if (!Cst) in matchNarrowBinopFeedingAnd() [all …]
|
| H A D | IRTranslator.cpp | 801 auto Cst = getOrCreateVReg( in emitJumpTableHeader() local 803 Cst = MIB.buildZExtOrTrunc(PtrScalarTy, Cst).getReg(0); in emitJumpTableHeader() 804 auto Cmp = MIB.buildICmp(CmpInst::ICMP_UGT, LLT::scalar(1), Sub, Cst); in emitJumpTableHeader() 2170 ConstantInt *Cst = cast<ConstantInt>(CI.getArgOperand(1)); in translateKnownIntrinsic() local 2173 ? Cst->isZero() ? TargetOpcode::G_CTTZ in translateKnownIntrinsic() 2175 : Cst->isZero() ? TargetOpcode::G_CTLZ in translateKnownIntrinsic()
|
| /llvm-project-15.0.7/mlir/test/mlir-pdll/Parser/ |
| H A D | string-eof.pdll | 4 Constraint Cst() [{ 9 Constraint Cst() "
|
| /llvm-project-15.0.7/llvm/include/llvm/CodeGen/GlobalISel/ |
| H A D | Utils.h | 352 int64_t Cst; variable 358 explicit RegOrConstant(int64_t Cst) : Cst(Cst), IsReg(false) {} in RegOrConstant() argument 367 return Cst; in getCst()
|
| H A D | MIPatternMatch.h | 90 inline ConstantMatch<APInt> m_ICst(APInt &Cst) { in m_ICst() argument 91 return ConstantMatch<APInt>(Cst); in m_ICst() 93 inline ConstantMatch<int64_t> m_ICst(int64_t &Cst) { in m_ICst() argument 94 return ConstantMatch<int64_t>(Cst); in m_ICst() 131 inline ICstOrSplatMatch<APInt> m_ICstOrSplat(APInt &Cst) { in m_ICstOrSplat() argument 132 return ICstOrSplatMatch<APInt>(Cst); in m_ICstOrSplat() 135 inline ICstOrSplatMatch<int64_t> m_ICstOrSplat(int64_t &Cst) { in m_ICstOrSplat() argument 136 return ICstOrSplatMatch<int64_t>(Cst); in m_ICstOrSplat()
|
| H A D | CombinerHelper.h | 355 Optional<APFloat> &Cst); 357 Optional<APFloat> &Cst);
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/GISel/ |
| H A D | AArch64PostLegalizerLowering.cpp | 410 auto Cst = in applyEXT() local 413 {MatchInfo.SrcOps[0], MatchInfo.SrcOps[1], Cst}); in applyEXT() 480 auto Cst = getAArch64VectorSplatScalar(*MI, MRI); in isVShiftRImm() local 481 if (!Cst) in isVShiftRImm() 483 Cnt = *Cst; in isVShiftRImm() 635 auto Cst = MIB.buildConstant(MRI.cloneVirtualRegister(RHS.getReg()), in applyAdjustICmpImmAndPred() local 638 RHS.setReg(Cst->getOperand(0).getReg()); in applyAdjustICmpImmAndPred() 732 int64_t Cst = Splat->getCst(); in matchBuildVectorToDup() local 733 return (Cst != 0 && Cst != -1); in matchBuildVectorToDup()
|
| H A D | AArch64PreLegalizerCombiner.cpp | 150 auto Cst = getIConstantVRegValWithLookThrough( in matchFoldGlobalOffset() local 152 if (!Cst) in matchFoldGlobalOffset() 154 MinOffset = std::min(MinOffset, Cst->Value.getZExtValue()); in matchFoldGlobalOffset()
|
| H A D | AArch64PostLegalizerCombiner.cpp | 60 auto Cst = getIConstantVRegValWithLookThrough(Src2, MRI); in matchExtractVecEltPairwiseAdd() local 61 if (!Cst || Cst->Value != 0) in matchExtractVecEltPairwiseAdd()
|
| /llvm-project-15.0.7/mlir/test/mlir-pdll-lsp-server/ |
| H A D | document-symbols.test | 8 …"text":"Pattern Foo {\nerase op<foo.op>;\n}\nConstraint Cst() -> Op{\nreturn op<toy.test>;\n}\n\nR… 43 // CHECK-NEXT: "name": "Cst",
|
| H A D | inlay-hints.test | 8 …Cst(attr: Attr);\nPattern {\n op<test.multi>(_: Value, _: Value);\n op<test.multi>(_: ValueRange…
|
| H A D | completion.test | 8 …"text":"#include \"include/included.pdll\"\nConstraint ValueCst(value: Value);\nConstraint Cst();\…
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | R600ISelDAGToDAG.cpp | 66 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Addr)) { in SelectGlobalValueConstantOffset() local 68 CurDAG->getIntPtrConstant(Cst->getZExtValue() / 4, SDLoc(Addr), true); in SelectGlobalValueConstantOffset()
|
| H A D | R600ISelLowering.cpp | 776 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local 777 return Cst->isZero(); in isZero() 1985 ConstantSDNode *Cst in FoldOperand() local 1987 Consts.push_back(Cst->getZExtValue()); in FoldOperand() 1992 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 1993 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | Reassociate.cpp | 1953 Constant *Cst = nullptr; in OptimizeExpression() local 1957 if (!Cst) { in OptimizeExpression() 1959 Cst = C; in OptimizeExpression() 1962 if (Constant *Res = ConstantFoldBinaryOpOperands(Opcode, C, Cst, DL)) { in OptimizeExpression() 1964 Cst = Res; in OptimizeExpression() 1972 return Cst; in OptimizeExpression() 1977 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1978 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1979 return Cst; in OptimizeExpression() 1980 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
| /llvm-project-15.0.7/llvm/lib/Target/Mips/ |
| H A D | MipsISelLowering.h | 462 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()
|
| /llvm-project-15.0.7/llvm/lib/Target/M68k/ |
| H A D | M68kISelDAGToDAG.cpp | 440 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 441 if (foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86ISelDAGToDAG.cpp | 2205 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 2206 if (!foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively() 4083 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in tryShrinkShlLogicImm() local 4084 if (!Cst) in tryShrinkShlLogicImm() 4087 int64_t Val = Cst->getSExtValue(); in tryShrinkShlLogicImm() 4156 unsigned ZExtWidth = Cst->getAPIntValue().getActiveBits(); in tryShrinkShlLogicImm() 4162 NeededMask &= ~Cst->getAPIntValue(); in tryShrinkShlLogicImm() 5035 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local 5036 if (!Cst) in Select() 5039 int64_t Val = Cst->getSExtValue(); in Select()
|