Home
last modified time | relevance | path

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

/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombineMulDivRem.cpp182 Value *Op1C = Op1; in visitMul() local
187 Op1C = Op0; in visitMul()
190 Value *Neg = dyn_castNegVal(Op1C); in visitMul()
192 (BO->getOperand(1) == Op1C || BO->getOperand(1) == Neg) && in visitMul()
200 if (Op1BO == Op1C) in visitMul()
212 if (Op1BO == Op1C) in visitMul()
260 if (Constant *Op1C = dyn_cast<Constant>(Op1)) { in visitFMul() local
261 if (ConstantFP *Op1F = dyn_cast<ConstantFP>(Op1C)) { in visitFMul()
266 } else if (Op1C->getType()->isVectorTy()) { in visitFMul()
267 if (ConstantVector *Op1V = dyn_cast<ConstantVector>(Op1C)) { in visitFMul()
[all …]
DInstCombineShifts.cpp638 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(I.getOperand(1))) { in visitShl() local
639 unsigned ShAmt = Op1C->getZExtValue(); in visitShl()
644 APInt::getHighBitsSet(Op1C->getBitWidth(), ShAmt))) { in visitShl()
677 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in visitLShr() local
678 unsigned ShAmt = Op1C->getZExtValue(); in visitLShr()
698 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt))){ in visitLShr()
717 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in visitAShr() local
718 unsigned ShAmt = Op1C->getZExtValue(); in visitAShr()
737 if (Op1C->getZExtValue() == DestBits-SrcBits) in visitAShr()
744 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt))){ in visitAShr()
DInstCombineAndOrXor.cpp1227 if (CastInst *Op1C = dyn_cast<CastInst>(Op1)) { in visitAnd() local
1229 if (Op0C->getOpcode() == Op1C->getOpcode() && // same cast kind ? in visitAnd()
1230 SrcTy == Op1C->getOperand(0)->getType() && in visitAnd()
1232 Value *Op0COp = Op0C->getOperand(0), *Op1COp = Op1C->getOperand(0); in visitAnd()
1236 ShouldOptimizeCast(Op1C->getOpcode(), Op1COp, I.getType())) { in visitAnd()
2010 CastInst *Op1C = dyn_cast<CastInst>(Op1); in visitOr() local
2011 if (Op1C && Op0C->getOpcode() == Op1C->getOpcode()) {// same cast kind ? in visitOr()
2013 if (SrcTy == Op1C->getOperand(0)->getType() && in visitOr()
2015 Value *Op0COp = Op0C->getOperand(0), *Op1COp = Op1C->getOperand(0); in visitOr()
2021 ShouldOptimizeCast(Op1C->getOpcode(), Op1COp, I.getType())) { in visitOr()
[all …]
DInstCombineCasts.cpp508 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp() local
509 const APInt &Op1CV = Op1C->getValue(); in transformZExtICmp()
546 uint32_t BitWidth = Op1C->getType()->getBitWidth(); in transformZExtICmp()
894 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in transformSExtICmp() local
897 if ((Pred == ICmpInst::ICMP_SLT && Op1C->isZero()) || in transformSExtICmp()
898 (Pred == ICmpInst::ICMP_SGT && Op1C->isAllOnesValue())) { in transformSExtICmp()
915 ICI->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp()
916 unsigned BitWidth = Op1C->getType()->getBitWidth(); in transformSExtICmp()
926 if (!Op1C->isZero() && Op1C->getValue() != KnownZeroMask) { in transformSExtICmp()
933 if (!Op1C->isZero() == (Pred == ICmpInst::ICMP_NE)) { in transformSExtICmp()
DInstCombineCompares.cpp2244 if (Constant *Op1C = dyn_cast<Constant>(Op1)) { in visitICmpInst() local
2245 Op1 = ConstantExpr::getBitCast(Op1C, Op0->getType()); in visitICmpInst()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineShifts.cpp708 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(I.getOperand(1))) { in visitShl() local
709 unsigned ShAmt = Op1C->getZExtValue(); in visitShl()
714 APInt::getHighBitsSet(Op1C->getBitWidth(), ShAmt), 0, in visitShl()
751 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in visitLShr() local
752 unsigned ShAmt = Op1C->getZExtValue(); in visitLShr()
772 MaskedValueIsZero(Op0, APInt::getLowBitsSet(Op1C->getBitWidth(), ShAmt), in visitLShr()
795 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in visitAShr() local
796 unsigned ShAmt = Op1C->getZExtValue(); in visitAShr()
810 if (Op1C->getZExtValue() == DestBits-SrcBits) in visitAShr()
817 MaskedValueIsZero(Op0, APInt::getLowBitsSet(Op1C->getBitWidth(), ShAmt), in visitAShr()
DInstCombineMulDivRem.cpp307 Value *Op1C = Op1; in visitMul() local
312 Op1C = Op0; in visitMul()
315 Value *Neg = dyn_castNegVal(Op1C); in visitMul()
317 (BO->getOperand(1) == Op1C || BO->getOperand(1) == Neg) && in visitMul()
325 if (Op1BO == Op1C) in visitMul()
337 if (Op1BO == Op1C) in visitMul()
1142 const APInt *Op1C; in visitSDiv() local
1143 if (match(Op1, m_APInt(Op1C))) { in visitSDiv()
1145 if (Op1C->isAllOnesValue()) in visitSDiv()
1149 if (I.isExact() && Op1C->isNonNegative() && Op1C->isPowerOf2()) { in visitSDiv()
[all …]
DInstCombineCasts.cpp588 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp() local
589 const APInt &Op1CV = Op1C->getValue(); in transformZExtICmp()
624 uint32_t BitWidth = Op1C->getType()->getBitWidth(); in transformZExtICmp()
975 if (Constant *Op1C = dyn_cast<Constant>(Op1)) { in transformSExtICmp() local
978 if ((Pred == ICmpInst::ICMP_SLT && Op1C->isNullValue()) || in transformSExtICmp()
979 (Pred == ICmpInst::ICMP_SGT && Op1C->isAllOnesValue())) { in transformSExtICmp()
993 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in transformSExtICmp() local
998 ICI->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp()
999 unsigned BitWidth = Op1C->getType()->getBitWidth(); in transformSExtICmp()
1008 if (!Op1C->isZero() && Op1C->getValue() != KnownZeroMask) { in transformSExtICmp()
[all …]
DInstCombineCompares.cpp3107 auto *Op1C = dyn_cast<Constant>(Op1); in canonicalizeCmpWithConstant() local
3108 if (!Op1C) in canonicalizeCmpWithConstant()
3118 auto *CI = dyn_cast<ConstantInt>(Op1C); in canonicalizeCmpWithConstant()
3128 Constant *Elt = Op1C->getAggregateElement(i); in canonicalizeCmpWithConstant()
3150 return new ICmpInst(NewPred, Op0, ConstantExpr::getAdd(Op1C, OneOrNegOne)); in canonicalizeCmpWithConstant()
3764 if (Constant *Op1C = dyn_cast<Constant>(Op1)) { in visitICmpInst() local
3765 Op1 = ConstantExpr::getBitCast(Op1C, Op0->getType()); in visitICmpInst()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineMulDivRem.cpp234 Constant *Op1C; in visitMul() local
235 if (match(Op0, m_Neg(m_Value(X))) && match(Op1, m_Constant(Op1C))) in visitMul()
236 return BinaryOperator::CreateMul(X, ConstantExpr::getNeg(Op1C)); in visitMul()
330 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in visitMul() local
333 ConstantExpr::getTrunc(Op1C, Op0Conv->getOperand(0)->getType()); in visitMul()
334 if (ConstantExpr::getSExt(CI, I.getType()) == Op1C && in visitMul()
366 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in visitMul() local
369 ConstantExpr::getTrunc(Op1C, Op0Conv->getOperand(0)->getType()); in visitMul()
370 if (ConstantExpr::getZExt(CI, I.getType()) == Op1C && in visitMul()
1045 const APInt *Op1C; in visitSDiv() local
[all …]
DInstCombineShifts.cpp351 const APInt *Op1C; in FoldShiftByConstant() local
352 if (!match(Op1, m_APInt(Op1C))) in FoldShiftByConstant()
358 canEvaluateShifted(Op0, Op1C->getZExtValue(), isLeftShift, *this, &I)) { in FoldShiftByConstant()
365 I, getShiftedValue(Op0, Op1C->getZExtValue(), isLeftShift, *this, DL)); in FoldShiftByConstant()
372 assert(!Op1C->uge(TypeBits) && in FoldShiftByConstant()
407 MaskV <<= Op1C->getZExtValue(); in FoldShiftByConstant()
410 MaskV.lshrInPlace(Op1C->getZExtValue()); in FoldShiftByConstant()
444 unsigned Op1Val = Op1C->getLimitedValue(TypeBits); in FoldShiftByConstant()
479 unsigned Op1Val = Op1C->getLimitedValue(TypeBits); in FoldShiftByConstant()
DInstCombineCasts.cpp1213 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in transformSExtICmp() local
1218 ICI->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp()
1226 if (!Op1C->isZero() && Op1C->getValue() != KnownZeroMask) { in transformSExtICmp()
1233 if (!Op1C->isZero() == (Pred == ICmpInst::ICMP_NE)) { in transformSExtICmp()
DInstCombineAddSub.cpp922 Constant *Op1C; in foldAddWithConstant() local
923 if (!match(Op1, m_Constant(Op1C))) in foldAddWithConstant()
939 return SelectInst::Create(X, AddOne(Op1C), Op1); in foldAddWithConstant()
943 return BinaryOperator::CreateSub(SubOne(Op1C), X); in foldAddWithConstant()
DInstCombineCompares.cpp4488 auto *Op1C = dyn_cast<Constant>(Op1); in canonicalizeCmpWithConstant() local
4489 if (!Op1C) in canonicalizeCmpWithConstant()
4499 auto *CI = dyn_cast<ConstantInt>(Op1C); in canonicalizeCmpWithConstant()
4509 Constant *Elt = Op1C->getAggregateElement(i); in canonicalizeCmpWithConstant()
4532 return new ICmpInst(NewPred, Op0, ConstantExpr::getAdd(Op1C, OneOrNegOne)); in canonicalizeCmpWithConstant()
4772 if (Constant *Op1C = dyn_cast<Constant>(Op1)) { in visitICmpInst() local
4773 Op1 = ConstantExpr::getBitCast(Op1C, Op0->getType()); in visitICmpInst()
/external/swiftshader/third_party/LLVM/lib/Analysis/
DValueTracking.cpp1137 if (Constant *Op1C = dyn_cast<Constant>(Op1)) in ComputeMultiple() local
1139 if (Op1C->getType()->getPrimitiveSizeInBits() < in ComputeMultiple()
1141 Op1C = ConstantExpr::getZExt(Op1C, MulC->getType()); in ComputeMultiple()
1142 if (Op1C->getType()->getPrimitiveSizeInBits() > in ComputeMultiple()
1144 MulC = ConstantExpr::getZExt(MulC, Op1C->getType()); in ComputeMultiple()
1147 Multiple = ConstantExpr::getMul(MulC, Op1C); in ComputeMultiple()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DConstantFolding.cpp2227 ConstantFP *Op1C = dyn_cast<ConstantFP>(CS.getArgOperand(1)); in isMathLibCallNoop() local
2228 if (Op0C && Op1C) { in isMathLibCallNoop()
2230 const APFloat &Op1 = Op1C->getValueAPF(); in isMathLibCallNoop()
2240 if (Ty == Op1C->getType()) { in isMathLibCallNoop()
2242 double Op1V = getValueAsDouble(Op1C); in isMathLibCallNoop()
DValueTracking.cpp2527 if (Constant *Op1C = dyn_cast<Constant>(Op1)) in ComputeMultiple() local
2529 if (Op1C->getType()->getPrimitiveSizeInBits() < in ComputeMultiple()
2531 Op1C = ConstantExpr::getZExt(Op1C, MulC->getType()); in ComputeMultiple()
2532 if (Op1C->getType()->getPrimitiveSizeInBits() > in ComputeMultiple()
2534 MulC = ConstantExpr::getZExt(MulC, Op1C->getType()); in ComputeMultiple()
2537 Multiple = ConstantExpr::getMul(MulC, Op1C); in ComputeMultiple()
DInstructionSimplify.cpp922 auto *Op1C = dyn_cast<Constant>(Op1); in simplifyDivRem() local
923 if (Op1C && Ty->isVectorTy()) { in simplifyDivRem()
926 Constant *Elt = Op1C->getAggregateElement(i); in simplifyDivRem()
/external/llvm/lib/Transforms/Utils/
DSimplifyLibCalls.cpp996 if (ConstantFP *Op1C = dyn_cast<ConstantFP>(Op1)) { in optimizePow() local
998 if (Op1C->isExactlyValue(1.0)) in optimizePow()
999 return Op1C; in optimizePow()
1001 if (Op1C->isExactlyValue(2.0) && in optimizePow()
1007 if (Op1C->isExactlyValue(10.0) && in optimizePow()
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/
DSimplifyLibCalls.cpp857 if (ConstantFP *Op1C = dyn_cast<ConstantFP>(Op1)) { in CallOptimizer() local
858 if (Op1C->isExactlyValue(1.0)) // pow(1.0, x) -> 1.0 in CallOptimizer()
859 return Op1C; in CallOptimizer()
860 if (Op1C->isExactlyValue(2.0)) // pow(2.0, x) -> exp2(x) in CallOptimizer()
/external/llvm/lib/Analysis/
DValueTracking.cpp2243 if (Constant *Op1C = dyn_cast<Constant>(Op1)) in ComputeMultiple() local
2245 if (Op1C->getType()->getPrimitiveSizeInBits() < in ComputeMultiple()
2247 Op1C = ConstantExpr::getZExt(Op1C, MulC->getType()); in ComputeMultiple()
2248 if (Op1C->getType()->getPrimitiveSizeInBits() > in ComputeMultiple()
2250 MulC = ConstantExpr::getZExt(MulC, Op1C->getType()); in ComputeMultiple()
2253 Multiple = ConstantExpr::getMul(MulC, Op1C); in ComputeMultiple()
/external/swiftshader/third_party/LLVM/lib/Target/X86/
DX86FastISel.cpp868 if (const ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in X86FastEmitCompare() local
869 if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(VT, Op1C)) { in X86FastEmitCompare()
872 .addImm(Op1C->getSExtValue()); in X86FastEmitCompare()
/external/llvm/lib/Target/X86/
DX86FastISel.cpp1387 if (const ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in X86FastEmitCompare() local
1388 if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(VT, Op1C)) { in X86FastEmitCompare()
1391 .addImm(Op1C->getSExtValue()); in X86FastEmitCompare()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/X86/
DX86FastISel.cpp1416 if (const ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) { in X86FastEmitCompare() local
1417 if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(VT, Op1C)) { in X86FastEmitCompare()
1420 .addImm(Op1C->getSExtValue()); in X86FastEmitCompare()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/SelectionDAG/
DTargetLowering.cpp362 auto *Op1C = dyn_cast<ConstantSDNode>(Op.getOperand(1)); in ShrinkDemandedConstant() local
363 if (!Op1C) in ShrinkDemandedConstant()
367 const APInt &C = Op1C->getAPIntValue(); in ShrinkDemandedConstant()