/external/llvm/tools/llvm-c-test/ |
D | echo.cpp | 220 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M); 222 static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant() argument 223 LLVMValueRef Ret = clone_constant_impl(Cst, M); in clone_constant() 224 check_value_kind(Ret, LLVMGetValueKind(Cst)); in clone_constant() 228 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant_impl() argument 229 if (!LLVMIsAConstant(Cst)) in clone_constant_impl() 233 if (LLVMIsAGlobalValue(Cst)) { in clone_constant_impl() 234 const char *Name = LLVMGetValueName(Cst); in clone_constant_impl() 237 if (LLVMIsAFunction(Cst)) { in clone_constant_impl() 238 check_value_kind(Cst, LLVMFunctionValueKind); in clone_constant_impl() [all …]
|
/external/llvm-project/llvm/tools/llvm-c-test/ |
D | echo.cpp | 227 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M); 229 static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant() argument 230 LLVMValueRef Ret = clone_constant_impl(Cst, M); in clone_constant() 231 check_value_kind(Ret, LLVMGetValueKind(Cst)); in clone_constant() 235 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant_impl() argument 236 if (!LLVMIsAConstant(Cst)) in clone_constant_impl() 240 if (LLVMIsAGlobalValue(Cst)) { in clone_constant_impl() 242 const char *Name = LLVMGetValueName2(Cst, &NameLen); in clone_constant_impl() 245 if (LLVMIsAFunction(Cst)) { in clone_constant_impl() 246 check_value_kind(Cst, LLVMFunctionValueKind); in clone_constant_impl() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/ |
D | AArch64PromoteConstant.cpp | 258 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument 324 static bool shouldConvertImpl(const Constant *Cst) { in shouldConvertImpl() argument 325 if (isa<const UndefValue>(Cst)) in shouldConvertImpl() 335 if (Cst->isZeroValue()) in shouldConvertImpl() 342 if (Cst->getType()->isVectorTy()) in shouldConvertImpl() 344 return isConstantUsingVectorTy(Cst->getType()); in shouldConvertImpl() 551 Constant *Cst = dyn_cast<Constant>(U); in runOnFunction() local 555 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst)) in runOnFunction() 559 if (!shouldConvert(*Cst, PromotionCache)) in runOnFunction() 564 if (!shouldConvertUse(Cst, &I, OpNo)) in runOnFunction() [all …]
|
D | AArch64StackTagging.cpp | 135 uint64_t Cst = 0x0101010101010101UL; in applyMemSet() local 138 Cst = (Cst >> LowBits) << LowBits; in applyMemSet() 141 Cst = (Cst << HighBits) >> HighBits; in applyMemSet() 143 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
|
/external/llvm/lib/Target/AArch64/ |
D | AArch64PromoteConstant.cpp | 250 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument 316 static bool shouldConvertImpl(const Constant *Cst) { in shouldConvertImpl() argument 317 if (isa<const UndefValue>(Cst)) in shouldConvertImpl() 327 if (Cst->isZeroValue()) in shouldConvertImpl() 334 if (Cst->getType()->isVectorTy()) in shouldConvertImpl() 336 return isConstantUsingVectorTy(Cst->getType()); in shouldConvertImpl() 543 Constant *Cst = dyn_cast<Constant>(U); in runOnFunction() local 547 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst)) in runOnFunction() 551 if (!shouldConvert(*Cst, PromotionCache)) in runOnFunction() 556 if (!shouldConvertUse(Cst, &I, OpNo)) in runOnFunction() [all …]
|
D | AArch64AddressTypePromotion.cpp | 321 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in propagateSignExtension() local 324 Cst->getSExtValue())); in propagateSignExtension()
|
/external/llvm-project/llvm/lib/Target/AArch64/ |
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 …]
|
D | AArch64StackTagging.cpp | 148 uint64_t Cst = 0x0101010101010101UL; in applyMemSet() local 151 Cst = (Cst >> LowBits) << LowBits; in applyMemSet() 154 Cst = (Cst << HighBits) >> HighBits; in applyMemSet() 156 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
|
/external/llvm-project/llvm/unittests/CodeGen/GlobalISel/ |
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 …]
|
D | PatternMatchTest.cpp | 38 int64_t Cst; in TEST_F() local 39 bool match = mi_match(MIBCst.getReg(0), *MRI, m_ICst(Cst)); in TEST_F() 41 EXPECT_EQ(Cst, 42); in TEST_F() 84 int64_t Cst; in TEST_F() local 86 m_GMul(m_ICst(Cst), m_Reg(Src0))); in TEST_F() 88 EXPECT_EQ(Cst, 42); in TEST_F() 94 m_GSub(m_ICst(Cst), m_Reg(Src0))); in TEST_F() 101 m_GFMul(m_ICst(Cst), m_Reg(Src0))); in TEST_F() 103 EXPECT_EQ(Cst, 42); in TEST_F()
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/MC/ |
D | MCValue.h | 41 int64_t Cst = 0; variable 46 int64_t getConstant() const { return Cst; } in getConstant() 66 R.Cst = Val; 75 R.Cst = Val; in get()
|
/external/llvm/include/llvm/MC/ |
D | MCValue.h | 42 int64_t Cst; variable 46 int64_t getConstant() const { return Cst; } in getConstant() 66 R.Cst = Val; 75 R.Cst = Val; in get()
|
/external/llvm-project/llvm/include/llvm/MC/ |
D | MCValue.h | 39 int64_t Cst = 0; variable 44 int64_t getConstant() const { return Cst; } in getConstant() 64 R.Cst = Val; 73 R.Cst = Val; in get()
|
/external/llvm-project/llvm/lib/Target/AArch64/GISel/ |
D | AArch64PostLegalizerLowering.cpp | 373 auto Cst = in applyEXT() local 376 {MatchInfo.SrcOps[0], MatchInfo.SrcOps[1], Cst}); in applyEXT() 388 auto Cst = getBuildVectorConstantSplat(*MI, MRI); in isVShiftRImm() local 389 if (!Cst) in isVShiftRImm() 391 Cnt = *Cst; in isVShiftRImm() 543 auto Cst = MIB.buildConstant(MRI.cloneVirtualRegister(RHS.getReg()), in applyAdjustICmpImmAndPred() local 546 RHS.setReg(Cst->getOperand(0).getReg()); in applyAdjustICmpImmAndPred()
|
D | AArch64PostLegalizerCombiner.cpp | 55 auto Cst = getConstantVRegValWithLookThrough(Src2, MRI); in matchExtractVecEltPairwiseAdd() local 56 if (!Cst || Cst->Value != 0) in matchExtractVecEltPairwiseAdd()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/GlobalISel/ |
D | CSEMIRBuilder.cpp | 160 if (Optional<APInt> Cst = ConstantFoldBinOp(Opc, SrcOps[0].getReg(), in buildInstr() local 162 return buildConstant(DstOps[0], Cst->getSExtValue()); in buildInstr()
|
/external/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
D | CSEMIRBuilder.cpp | 190 if (Optional<APInt> Cst = ConstantFoldBinOp(Opc, SrcOps[0].getReg(), in buildInstr() local 192 return buildConstant(DstOps[0], Cst->getSExtValue()); in buildInstr()
|
D | CombinerHelper.cpp | 1476 Optional<APFloat> &Cst) { in matchCombineConstantFoldFpUnary() argument 1480 Cst = constantFoldFpUnary(MI.getOpcode(), DstTy, SrcReg, MRI); in matchCombineConstantFoldFpUnary() 1481 return Cst.hasValue(); in matchCombineConstantFoldFpUnary() 1485 Optional<APFloat> &Cst) { in applyCombineConstantFoldFpUnary() argument 1486 assert(Cst.hasValue() && "Optional is unexpectedly empty!"); in applyCombineConstantFoldFpUnary() 1489 auto *FPVal = ConstantFP::get(MF.getFunction().getContext(), *Cst); in applyCombineConstantFoldFpUnary() 2204 int64_t Cst; in matchCombineConstPtrAddToI2P() local 2205 if (mi_match(LHS, MRI, m_GIntToPtr(m_ICst(Cst)))) { in matchCombineConstPtrAddToI2P() 2206 NewCst = Cst + *RHSCst; in matchCombineConstPtrAddToI2P() 2944 int64_t Cst, bool IsVector, bool IsFP) { in isConstValidTrue() argument [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 1792 Constant *Cst = nullptr; in OptimizeExpression() local 1796 Cst = Cst ? ConstantExpr::get(Opcode, C, Cst) : C; in OptimizeExpression() 1800 return Cst; in OptimizeExpression() 1805 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1806 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1807 return Cst; in OptimizeExpression() 1808 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 523 Value *A = nullptr; ConstantInt *Cst = nullptr; in visitTrunc() local 525 match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 534 if (Cst->getZExtValue() >= ASize) in visitTrunc() 540 Value *Shift = Builder->CreateLShr(A, Cst->getZExtValue()); in visitTrunc() 551 match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst))) && in visitTrunc() 558 if (Cst->getValue().ult(ASize)) { in visitTrunc() 559 Value *Shift = Builder->CreateAShr(A, Cst->getZExtValue()); in visitTrunc() 569 match(Src, m_And(m_Value(A), m_ConstantInt(Cst)))) { in visitTrunc() 572 ConstantExpr::getTrunc(Cst, DestTy)); in visitTrunc()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 1838 Constant *Cst = nullptr; in OptimizeExpression() local 1842 Cst = Cst ? ConstantExpr::get(Opcode, C, Cst) : C; in OptimizeExpression() 1846 return Cst; in OptimizeExpression() 1851 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1852 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1853 return Cst; in OptimizeExpression() 1854 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
/external/llvm-project/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 1936 Constant *Cst = nullptr; in OptimizeExpression() local 1940 Cst = Cst ? ConstantExpr::get(Opcode, C, Cst) : C; in OptimizeExpression() 1944 return Cst; in OptimizeExpression() 1949 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1950 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1951 return Cst; in OptimizeExpression() 1952 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
/external/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
D | CombinerHelper.h | 291 Optional<APFloat> &Cst); 293 Optional<APFloat> &Cst);
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/GlobalISel/ |
D | MIPatternMatch.h | 55 inline ConstantMatch m_ICst(int64_t &Cst) { return ConstantMatch(Cst); } in m_ICst() argument
|
/external/llvm-project/llvm/lib/Target/Mips/ |
D | MipsISelLowering.h | 458 SDValue Cst = DAG.getConstant(16, DL, MVT::i32); in getAddrNonPICSym64() local 459 SDValue Shift = DAG.getNode(ISD::SHL, DL, Ty, HigherPart, Cst); in getAddrNonPICSym64() 462 SDValue Shift2 = DAG.getNode(ISD::SHL, DL, Ty, Add, Cst); in getAddrNonPICSym64()
|