Home
last modified time | relevance | path

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

12

/external/llvm/tools/llvm-c-test/
Decho.cpp220 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/
DAArch64PromoteConstant.cpp250 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 …]
DAArch64AddressTypePromotion.cpp321 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/
DAArch64PromoteConstant.cpp258 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 …]
DAArch64StackTagging.cpp135 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/
DMCValue.h41 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/
DMCValue.h42 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/
DCSEMIRBuilder.cpp160 if (Optional<APInt> Cst = ConstantFoldBinOp(Opc, SrcOps[0].getReg(), in buildInstr() local
162 return buildConstant(DstOps[0], Cst->getSExtValue()); in buildInstr()
DIRTranslator.cpp554 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()
DMachineIRBuilder.cpp236 auto Cst = buildConstant(ValueTy, Value); in materializePtrAdd() local
237 return buildPtrAdd(Res, Op0, Cst.getReg(0)); in materializePtrAdd()
/external/llvm/lib/Transforms/Scalar/
DReassociate.cpp1792 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/
DInstCombineCasts.cpp523 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()
DInstCombineCompares.cpp1405 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/
DReassociate.cpp1838 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/
DMipsISelLowering.h472 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/
DMIPatternMatch.h55 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/
DInstCombineCasts.cpp759 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/
DR600ISelLowering.cpp919 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/
DX86ISelDAGToDAG.cpp1931 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/
DR600ISelLowering.cpp1085 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()
DAMDGPUISelDAGToDAG.cpp511 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/
DSelectionDAG.cpp276 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/
DX86ISelDAGToDAG.cpp1130 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/
DCodeGenPrepare.cpp3864 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/
Dgep-alias.ll236 ; Make sure we recognize that u[0] and u[Global + Cst] may alias

12