/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/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/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/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/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()
|
D | IRTranslator.cpp | 554 auto Cst = getOrCreateVReg( in emitJumpTableHeader() local 556 Cst = MIB.buildZExtOrTrunc(PtrScalarTy, Cst).getReg(0); in emitJumpTableHeader() 557 auto Cmp = MIB.buildICmp(CmpInst::ICMP_UGT, LLT::scalar(1), Sub, Cst); in emitJumpTableHeader() 1504 ConstantInt *Cst = cast<ConstantInt>(CI.getArgOperand(1)); in translateKnownIntrinsic() local 1507 ? Cst->isZero() ? TargetOpcode::G_CTTZ in translateKnownIntrinsic() 1509 : Cst->isZero() ? TargetOpcode::G_CTLZ in translateKnownIntrinsic()
|
D | MachineIRBuilder.cpp | 236 auto Cst = buildConstant(ValueTy, Value); in materializePtrAdd() local 237 return buildPtrAdd(Res, Op0, Cst.getReg(0)); in materializePtrAdd()
|
/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()
|
D | InstCombineCompares.cpp | 1405 Constant *Cst = Builder->getInt1(IsICMP_NE); in FoldICmpShrCst() local 1406 return replaceInstUsesWith(ICI, Cst); in FoldICmpShrCst() 2001 Constant *Cst = Builder->getInt1(IsICMP_NE); in visitICmpInstWithInstAndIntCst() local 2002 return replaceInstUsesWith(ICI, Cst); in visitICmpInstWithInstAndIntCst() 4284 Value *X; ConstantInt *Cst; in visitICmpInst() local 4286 if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X) in visitICmpInst() 4287 return FoldICmpAddOpCst(I, X, Cst, I.getPredicate()); in visitICmpInst() 4290 if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X) in visitICmpInst() 4291 return FoldICmpAddOpCst(I, X, Cst, I.getSwappedPredicate()); in visitICmpInst()
|
/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/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Mips/ |
D | MipsISelLowering.h | 472 SDValue Cst = DAG.getConstant(16, DL, MVT::i32); in getAddrNonPICSym64() local 473 SDValue Shift = DAG.getNode(ISD::SHL, DL, Ty, HigherPart, Cst); in getAddrNonPICSym64() 476 SDValue Shift2 = DAG.getNode(ISD::SHL, DL, Ty, Add, Cst); in getAddrNonPICSym64()
|
/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/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 759 Value *A = nullptr; ConstantInt *Cst = nullptr; in visitTrunc() local 761 match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 770 if (Cst->getZExtValue() >= ASize) in visitTrunc() 776 Value *Shift = Builder.CreateLShr(A, Cst->getZExtValue()); in visitTrunc() 788 match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 794 unsigned ShiftAmt = Cst->getZExtValue(); in visitTrunc() 826 if (match(Src, m_Shl(m_Value(A), m_ConstantInt(Cst))) && in visitTrunc() 831 if (Cst->getValue().ult(DestSize)) { in visitTrunc() 836 ConstantInt::get(DestTy, Cst->getValue().trunc(DestSize))); in visitTrunc()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/ |
D | R600ISelLowering.cpp | 919 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local 920 return Cst->isNullValue(); in isZero() 2127 ConstantSDNode *Cst in FoldOperand() local 2129 Consts.push_back(Cst->getZExtValue()); in FoldOperand() 2134 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 2135 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/X86/ |
D | X86ISelDAGToDAG.cpp | 1931 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 1932 if (!foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively() 3796 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in tryShrinkShlLogicImm() local 3797 if (!Cst) in tryShrinkShlLogicImm() 3800 int64_t Val = Cst->getSExtValue(); in tryShrinkShlLogicImm() 3869 unsigned ZExtWidth = Cst->getAPIntValue().getActiveBits(); in tryShrinkShlLogicImm() 3875 NeededMask &= ~Cst->getAPIntValue(); in tryShrinkShlLogicImm() 4599 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local 4600 if (!Cst) in Select() 4603 int64_t Val = Cst->getSExtValue(); in Select()
|
/external/llvm/lib/Target/AMDGPU/ |
D | R600ISelLowering.cpp | 1085 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local 1086 return Cst->isNullValue(); in isZero() 2227 ConstantSDNode *Cst in FoldOperand() local 2229 Consts.push_back(Cst->getZExtValue()); in FoldOperand() 2234 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 2235 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
D | AMDGPUISelDAGToDAG.cpp | 511 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Addr)) { in SelectGlobalValueConstantOffset() local 512 IntPtr = CurDAG->getIntPtrConstant(Cst->getZExtValue() / 4, SDLoc(Addr), in SelectGlobalValueConstantOffset()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/ |
D | SelectionDAG.cpp | 276 if (auto *Cst = dyn_cast<ConstantSDNode>(Op)) in matchUnaryPredicate() local 277 return Match(Cst); in matchUnaryPredicate() 291 auto *Cst = dyn_cast<ConstantSDNode>(Op.getOperand(i)); in matchUnaryPredicate() local 292 if (!Cst || Cst->getValueType(0) != SVT || !Match(Cst)) in matchUnaryPredicate() 3015 const Constant *Cst = TLI->getTargetConstantFromLoad(LD); in computeKnownBits() local 3016 if (ISD::isNON_EXTLoad(LD) && Cst) { in computeKnownBits() 3018 Type *CstTy = Cst->getType(); in computeKnownBits() 3023 if (const Constant *Splat = Cst->getSplatValue()) { in computeKnownBits() 3024 Cst = Splat; in computeKnownBits() 3025 CstTy = Cst->getType(); in computeKnownBits() [all …]
|
/external/llvm/lib/Target/X86/ |
D | X86ISelDAGToDAG.cpp | 1130 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in matchAddressRecursively() local 1131 if (!foldOffsetIntoAddress(Cst->getSExtValue(), AM)) in matchAddressRecursively() 2046 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local 2048 if (!Cst || !ShlCst) in Select() 2051 int64_t Val = Cst->getSExtValue(); in Select()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/ |
D | CodeGenPrepare.cpp | 3864 const ConstantInt *Cst = dyn_cast<ConstantInt>(Inst->getOperand(1)); in canGetThrough() local 3866 if (Cst && !Cst->getValue().isAllOnesValue()) in canGetThrough() 3888 const auto *Cst = dyn_cast<ConstantInt>(AndInst->getOperand(1)); in canGetThrough() local 3889 if (Cst && in canGetThrough() 3890 Cst->getValue().isIntN(Inst->getType()->getIntegerBitWidth())) in canGetThrough() 4069 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in promoteOperandForOther() local 4072 APInt CstVal = IsSExt ? Cst->getValue().sext(BitWidth) in promoteOperandForOther() 4073 : Cst->getValue().zext(BitWidth); in promoteOperandForOther()
|
/external/llvm/test/Analysis/BasicAA/ |
D | gep-alias.ll | 236 ; Make sure we recognize that u[0] and u[Global + Cst] may alias
|