/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineMulDivRem.cpp | 182 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 …]
|
D | InstCombineShifts.cpp | 638 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()
|
D | InstCombineAndOrXor.cpp | 1227 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 …]
|
D | InstCombineCasts.cpp | 508 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()
|
D | InstCombineCompares.cpp | 2244 if (Constant *Op1C = dyn_cast<Constant>(Op1)) { in visitICmpInst() local 2245 Op1 = ConstantExpr::getBitCast(Op1C, Op0->getType()); in visitICmpInst()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 708 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()
|
D | InstCombineMulDivRem.cpp | 307 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 …]
|
D | InstCombineCasts.cpp | 588 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 …]
|
D | InstCombineCompares.cpp | 3107 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/lib/Analysis/ |
D | ValueTracking.cpp | 1137 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/llvm/lib/Transforms/Utils/ |
D | SimplifyLibCalls.cpp | 996 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/ |
D | SimplifyLibCalls.cpp | 857 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/ |
D | ValueTracking.cpp | 2243 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/ |
D | X86FastISel.cpp | 868 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/ |
D | X86FastISel.cpp | 1387 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()
|