/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 561 auto NewInnerShift = [&](unsigned ShAmt) { in foldShiftedShift() argument 562 InnerShift->setOperand(1, ConstantInt::get(ShType, ShAmt)); in foldShiftedShift() 724 Constant *ShAmt = in FoldShiftByConstant() local 727 Value *NSh = Builder.CreateBinOp(I.getOpcode(), TrOp, ShAmt, I.getName()); in FoldShiftByConstant() 947 unsigned ShAmt = ShAmtAPInt->getZExtValue(); in visitShl() local 954 if (ShAmt < SrcWidth && in visitShl() 955 MaskedValueIsZero(X, APInt::getHighBitsSet(SrcWidth, ShAmt), 0, &I)) in visitShl() 956 return new ZExtInst(Builder.CreateShl(X, ShAmt), Ty); in visitShl() 961 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmt)); in visitShl() 970 if (ShrAmt < ShAmt) { in visitShl() [all …]
|
D | InstCombineCasts.cpp | 548 Value *ShAmt = matchShiftAmount(ShAmt0, ShAmt1, NarrowWidth); in narrowRotate() local 550 if (!ShAmt) { in narrowRotate() 551 ShAmt = matchShiftAmount(ShAmt1, ShAmt0, NarrowWidth); in narrowRotate() 554 if (!ShAmt) in narrowRotate() 568 Value *NarrowShAmt = Builder.CreateTrunc(ShAmt, DestTy); in narrowRotate() 902 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp() local 904 if (ShAmt) { in transformZExtICmp() 907 In = Builder.CreateLShr(In, ConstantInt::get(In->getType(), ShAmt), in transformZExtICmp() 1400 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local 1401 return BinaryOperator::CreateAShr(Builder.CreateShl(Res, ShAmt, "sext"), in visitSExt() [all …]
|
D | InstCombineAddSub.cpp | 1253 Constant *ShAmt = ConstantInt::get(Ty, ExtendAmt); in visitAdd() local 1254 Value *NewShl = Builder.CreateShl(XorLHS, ShAmt, "sext"); in visitAdd() 1255 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd() 1790 const APInt *ShAmt; in visitSub() local 1793 match(Op1Wide, m_LShr(m_Value(X), m_APInt(ShAmt))) && in visitSub() 1794 *ShAmt == BitWidth - 1) { in visitSub() 1805 match(Op1Wide, m_AShr(m_Value(X), m_APInt(ShAmt))) && in visitSub() 1806 *ShAmt == BitWidth - 1) { in visitSub() 2080 const APInt *ShAmt; in visitSub() local 2082 if (match(Op1, m_AShr(m_Value(A), m_APInt(ShAmt))) && in visitSub() [all …]
|
D | InstCombineAndOrXor.cpp | 1965 const APInt *ShAmt; in visitAnd() local 1968 m_APInt(ShAmt))), in visitAnd() 1970 *ShAmt == Ty->getScalarSizeInBits() - 1) { in visitAnd() 2073 Value *ShAmt = matchShiftAmount(ShAmt0, ShAmt1, Width); in matchRotate() local 2075 if (!ShAmt) { in matchRotate() 2076 ShAmt = matchShiftAmount(ShAmt1, ShAmt0, Width); in matchRotate() 2079 if (!ShAmt) in matchRotate() 2086 return IntrinsicInst::Create(F, { ShVal, ShVal, ShAmt }); in matchRotate() 2716 const APInt *ShAmt; in visitOr() local 2719 m_APInt(ShAmt))), in visitOr() [all …]
|
D | InstCombineSelect.cpp | 2302 Value *ShAmt; in foldSelectRotate() local 2304 ShAmt = SA0; in foldSelectRotate() 2306 ShAmt = SA1; in foldSelectRotate() 2313 if (!match(Cond, m_OneUse(m_ICmp(Pred, m_Specific(ShAmt), m_ZeroInt()))) || in foldSelectRotate() 2319 bool IsFshl = (ShAmt == SA0 && ShiftOpcode0 == BinaryOperator::Shl) || in foldSelectRotate() 2320 (ShAmt == SA1 && ShiftOpcode1 == BinaryOperator::Shl); in foldSelectRotate() 2323 return IntrinsicInst::Create(F, { TVal, TVal, ShAmt }); in foldSelectRotate()
|
D | InstCombineCompares.cpp | 4249 unsigned ShAmt = (unsigned)Cst1->getLimitedValue(TypeBits); in foldICmpEquality() local 4250 if (ShAmt < TypeBits && ShAmt != 0) { in foldICmpEquality() 4254 APInt CmpVal = APInt::getOneBitSet(TypeBits, ShAmt); in foldICmpEquality() 4263 unsigned ShAmt = (unsigned)Cst1->getLimitedValue(TypeBits); in foldICmpEquality() local 4264 if (ShAmt < TypeBits && ShAmt != 0) { in foldICmpEquality() 4266 APInt AndVal = APInt::getLowBitsSet(TypeBits, TypeBits - ShAmt); in foldICmpEquality() 4275 uint64_t ShAmt = 0; in foldICmpEquality() local 4277 match(Op0, m_Trunc(m_OneUse(m_LShr(m_Value(A), m_ConstantInt(ShAmt))))) && in foldICmpEquality() 4284 if (ShAmt < ASize) { in foldICmpEquality() 4287 MaskV <<= ShAmt; in foldICmpEquality() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/RISCV/ |
D | RISCVISelDAGToDAG.cpp | 148 uint64_t ShAmt = cast<ConstantSDNode>(Op1.getNode())->getZExtValue(); in Select() local 150 if ((Mask | maskTrailingOnes<uint64_t>(ShAmt)) == 0xffffffff) { in Select() 152 CurDAG->getTargetConstant(ShAmt, SDLoc(Node), XLenVT); in Select()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Lanai/ |
D | LanaiISelLowering.cpp | 1243 SDValue ShAmt = Op.getOperand(2); in LowerSHL_PARTS() local 1253 DAG.getConstant(VTBits, dl, MVT::i32), ShAmt); in LowerSHL_PARTS() 1259 SDValue SetCC = DAG.getSetCC(dl, MVT::i32, ShAmt, Zero, ISD::SETEQ); in LowerSHL_PARTS() 1262 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i32, ShAmt, in LowerSHL_PARTS() 1264 SDValue HiBitsForHi = DAG.getNode(ISD::SHL, dl, VT, ShOpHi, ShAmt); in LowerSHL_PARTS() 1276 SDValue LoForNormalShift = DAG.getNode(ISD::SHL, dl, VT, ShOpLo, ShAmt); in LowerSHL_PARTS() 1291 SDValue ShAmt = Op.getOperand(2); in LowerSRL_PARTS() local 1306 ISD::SUB, dl, MVT::i32, DAG.getConstant(VTBits, dl, MVT::i32), ShAmt); in LowerSRL_PARTS() 1309 SDValue Hi = DAG.getNode(ISD::SRL, dl, MVT::i32, ShOpHi, ShAmt); in LowerSRL_PARTS() 1312 SDValue Lo = DAG.getNode(ISD::SRL, dl, MVT::i32, ShOpLo, ShAmt); in LowerSRL_PARTS() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/src/ |
D | IceTargetLoweringARM32.cpp | 545 const int32_t ShAmt = (DestTy == IceType_i16) ? 16 : 24; in genTargetHelperCallFor() local 548 NewC &= ~(0x80000000l >> ShAmt); in genTargetHelperCallFor() 550 NewC = (NewC << ShAmt) >> ShAmt; in genTargetHelperCallFor() 2614 const int32_t ShAmt = SrcsLo.getConstantValue() & 0x3F; in lowerInt64Arithmetic() local 2615 if (ShAmt == 0) { in lowerInt64Arithmetic() 2621 if (ShAmt >= 32) { in lowerInt64Arithmetic() 2622 if (ShAmt == 32) { in lowerInt64Arithmetic() 2625 Operand *ShAmtImm = shAmtImm(ShAmt - 32); in lowerInt64Arithmetic() 2647 Operand *ShAmtImm = shAmtImm(ShAmt); in lowerInt64Arithmetic() 2648 Operand *ComplShAmtImm = shAmtImm(32 - ShAmt); in lowerInt64Arithmetic() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/ |
D | TargetLowering.cpp | 1329 unsigned ShAmt = SA->getZExtValue(); in SimplifyDemandedBits() local 1330 if (ShAmt == 0) in SimplifyDemandedBits() 1338 if (!DemandedBits.intersects(APInt::getLowBitsSet(BitWidth, ShAmt))) { in SimplifyDemandedBits() 1344 int Diff = ShAmt - C1; in SimplifyDemandedBits() 1358 if (SimplifyDemandedBits(Op0, DemandedBits.lshr(ShAmt), DemandedElts, in SimplifyDemandedBits() 1364 if ((ShAmt < DemandedBits.getActiveBits()) && in SimplifyDemandedBits() 1374 if (ShAmt < InnerBits && DemandedBits.getActiveBits() <= InnerBits && in SimplifyDemandedBits() 1377 if (!APInt(BitWidth, ShAmt).isIntN(ShTy.getSizeInBits())) in SimplifyDemandedBits() 1381 TLO.DAG.getConstant(ShAmt, dl, ShTy)); in SimplifyDemandedBits() 1395 if (InnerShAmt < ShAmt && InnerShAmt < InnerBits && in SimplifyDemandedBits() [all …]
|
D | LegalizeVectorOps.cpp | 786 SDValue ShAmt = DAG.getConstant( in ExpandLoad() local 788 SDValue Lo = DAG.getNode(ISD::SRL, dl, WideVT, LoadVals[WideIdx], ShAmt); in ExpandLoad() 795 ShAmt = DAG.getConstant( in ExpandLoad() 799 DAG.getNode(ISD::SHL, dl, WideVT, LoadVals[WideIdx], ShAmt); in ExpandLoad() 815 ShAmt = in ExpandLoad() 818 Lo = DAG.getNode(ISD::SHL, dl, WideVT, Lo, ShAmt); in ExpandLoad() 819 Lo = DAG.getNode(ISD::SRA, dl, WideVT, Lo, ShAmt); in ExpandLoad()
|
D | DAGCombiner.cpp | 626 EVT &MemVT, unsigned ShAmt = 0); 2064 SDValue ShAmt = ShiftOp.getOperand(1); in foldAddSubOfSignBit() local 2065 ConstantSDNode *ShAmtC = isConstOrConstSplat(ShAmt); in foldAddSubOfSignBit() 2074 SDValue NewShift = DAG.getNode(ShOpcode, DL, VT, Not.getOperand(0), ShAmt); in foldAddSubOfSignBit() 3250 SDValue ShAmt = N1.getOperand(1); in visitSUB() local 3251 ConstantSDNode *ShAmtC = isConstOrConstSplat(ShAmt); in visitSUB() 3254 SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, N1.getOperand(0), ShAmt); in visitSUB() 3536 unsigned ShAmt = in visitMUL() local 3538 assert(ShAmt < VT.getScalarSizeInBits() && in visitMUL() 3542 DAG.getNode(ISD::SHL, DL, VT, N0, DAG.getConstant(ShAmt, DL, VT)); in visitMUL() [all …]
|
D | SelectionDAG.cpp | 2430 const APInt &ShAmt = SA->getAPIntValue(); in getValidShiftAmountConstant() local 2431 if (ShAmt.ult(BitWidth)) in getValidShiftAmountConstant() 2432 return &ShAmt; in getValidShiftAmountConstant() 2453 const APInt &ShAmt = SA->getAPIntValue(); in getValidMinimumShiftAmountConstant() local 2454 if (ShAmt.uge(BitWidth)) in getValidMinimumShiftAmountConstant() 2456 if (MinShAmt && MinShAmt->ule(ShAmt)) in getValidMinimumShiftAmountConstant() 2458 MinShAmt = &ShAmt; in getValidMinimumShiftAmountConstant() 2479 const APInt &ShAmt = SA->getAPIntValue(); in getValidMaximumShiftAmountConstant() local 2480 if (ShAmt.uge(BitWidth)) in getValidMaximumShiftAmountConstant() 2482 if (MaxShAmt && MaxShAmt->uge(ShAmt)) in getValidMaximumShiftAmountConstant() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/ |
D | ConstantFold.cpp | 271 APInt ShAmt = Amt->getValue(); in ExtractConstantBytes() local 273 if ((ShAmt & 7) != 0) in ExtractConstantBytes() 275 ShAmt.lshrInPlace(3); in ExtractConstantBytes() 278 if (ShAmt.uge(CSize - ByteStart)) in ExtractConstantBytes() 282 if (ShAmt.ule(CSize - (ByteStart + ByteSize))) in ExtractConstantBytes() 284 ByteStart + ShAmt.getZExtValue(), ByteSize); in ExtractConstantBytes() 294 APInt ShAmt = Amt->getValue(); in ExtractConstantBytes() local 296 if ((ShAmt & 7) != 0) in ExtractConstantBytes() 298 ShAmt.lshrInPlace(3); in ExtractConstantBytes() 301 if (ShAmt.uge(ByteStart + ByteSize)) in ExtractConstantBytes() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/ARM/ |
D | ARMISelDAGToDAG.cpp | 83 ARM_AM::ShiftOpc ShOpcVal, unsigned ShAmt); 502 unsigned ShAmt) { in isShifterOpProfitable() argument 509 (ShAmt == 2 || (Subtarget->isSwift() && ShAmt == 1)); in isShifterOpProfitable() 694 unsigned ShAmt = Log2_32(RHSC); in SelectLdStSOReg() local 696 Opc = CurDAG->getTargetConstant(ARM_AM::getAM2Opc(AddSub, ShAmt, in SelectLdStSOReg() 722 unsigned ShAmt = 0; in SelectLdStSOReg() local 732 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg() 733 if (isShifterOpProfitable(Offset, ShOpcVal, ShAmt)) in SelectLdStSOReg() 736 ShAmt = 0; in SelectLdStSOReg() 754 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg() [all …]
|
D | ARMBaseInstrInfo.cpp | 4093 unsigned ShAmt = DefMI.getOperand(3).getImm(); in adjustDefLatency() local 4094 if (ShAmt == 0 || ShAmt == 2) in adjustDefLatency() 4124 unsigned ShAmt = DefMI.getOperand(3).getImm(); in adjustDefLatency() local 4125 if (ShAmt == 0 || ShAmt == 1 || ShAmt == 2 || ShAmt == 3) in adjustDefLatency() 4398 unsigned ShAmt = in getOperandLatency() local 4400 if (ShAmt == 0 || ShAmt == 2) in getOperandLatency()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/lib/Support/ |
D | APInt.cpp | 2020 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const { in sshl_ov() argument 2021 Overflow = ShAmt.uge(getBitWidth()); in sshl_ov() 2026 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov() 2028 Overflow = ShAmt.uge(countLeadingOnes()); in sshl_ov() 2030 return *this << ShAmt; in sshl_ov() 2033 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const { in ushl_ov() argument 2034 Overflow = ShAmt.uge(getBitWidth()); in ushl_ov() 2038 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov() 2040 return *this << ShAmt; in ushl_ov()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/NVPTX/ |
D | NVPTXISelLowering.cpp | 1972 SDValue ShAmt = Op.getOperand(2); in LowerShiftRightParts() local 1981 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts() 1983 ShAmt); in LowerShiftRightParts() 1999 ShAmt); in LowerShiftRightParts() 2000 SDValue Tmp1 = DAG.getNode(ISD::SRL, dl, VT, ShOpLo, ShAmt); in LowerShiftRightParts() 2001 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i32, ShAmt, in LowerShiftRightParts() 2007 SDValue Cmp = DAG.getSetCC(dl, MVT::i1, ShAmt, in LowerShiftRightParts() 2010 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts() 2033 SDValue ShAmt = Op.getOperand(2); in LowerShiftLeftParts() local 2042 ShAmt); in LowerShiftLeftParts() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/ |
D | APInt.cpp | 2015 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const { in sshl_ov() argument 2016 Overflow = ShAmt.uge(getBitWidth()); in sshl_ov() 2021 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov() 2023 Overflow = ShAmt.uge(countLeadingOnes()); in sshl_ov() 2025 return *this << ShAmt; in sshl_ov() 2028 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const { in ushl_ov() argument 2029 Overflow = ShAmt.uge(getBitWidth()); in ushl_ov() 2033 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov() 2035 return *this << ShAmt; in ushl_ov()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/PowerPC/ |
D | PPCInstrInfo.cpp | 3790 uint64_t ShAmt = Imm & (SpecialShift32 ? 0x1F : 0x3F); in transformToImmFormFedByLI() local 3796 else if (!SetCR && ShAmt == 0 && !PostRA) { in transformToImmFormFedByLI() 3805 uint64_t SH = ShAmt == 0 ? 0 : RightShift ? 32 - ShAmt : ShAmt; in transformToImmFormFedByLI() 3806 uint64_t MB = RightShift ? ShAmt : 0; in transformToImmFormFedByLI() 3807 uint64_t ME = RightShift ? 31 : 31 - ShAmt; in transformToImmFormFedByLI() 3815 uint64_t SH = ShAmt == 0 ? 0 : RightShift ? 64 - ShAmt : ShAmt; in transformToImmFormFedByLI() 3816 uint64_t ME = RightShift ? ShAmt : 63 - ShAmt; in transformToImmFormFedByLI()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 1981 const APInt *ShAmt; in SimplifyAndInst() local 1985 if (match(Op0, m_Shl(m_Value(X), m_APInt(ShAmt))) && in SimplifyAndInst() 1986 (~(*Mask)).lshr(*ShAmt).isNullValue()) in SimplifyAndInst() 1991 if (match(Op0, m_LShr(m_Value(X), m_APInt(ShAmt))) && in SimplifyAndInst() 1992 (~(*Mask)).shl(*ShAmt).isNullValue()) in SimplifyAndInst() 2069 match(Op0, m_c_Or(m_CombineAnd(m_NUWShl(m_Value(X), m_APInt(ShAmt)), in SimplifyAndInst() 2073 const unsigned ShftCnt = ShAmt->getLimitedValue(Width); in SimplifyAndInst() 3871 Value *ShAmt; in simplifySelectWithICmpCond() local 3873 m_Value(ShAmt)), in simplifySelectWithICmpCond() 3875 m_Value(ShAmt))); in simplifySelectWithICmpCond() [all …]
|
D | ConstantFolding.cpp | 2356 unsigned ShAmt = C2->urem(BitWidth); in ConstantFoldScalarCall3() local 2357 if (!ShAmt) in ConstantFoldScalarCall3() 2361 unsigned LshrAmt = IsRight ? ShAmt : BitWidth - ShAmt; in ConstantFoldScalarCall3() 2362 unsigned ShlAmt = !IsRight ? ShAmt : BitWidth - ShAmt; in ConstantFoldScalarCall3()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/ |
D | SROA.cpp | 2134 uint64_t ShAmt = 8 * Offset; in extractInteger() local 2136 ShAmt = 8 * (DL.getTypeStoreSize(IntTy) - DL.getTypeStoreSize(Ty) - Offset); in extractInteger() 2137 if (ShAmt) { in extractInteger() 2138 V = IRB.CreateLShr(V, ShAmt, Name + ".shift"); in extractInteger() 2163 uint64_t ShAmt = 8 * Offset; in insertInteger() local 2165 ShAmt = 8 * (DL.getTypeStoreSize(IntTy) - DL.getTypeStoreSize(Ty) - Offset); in insertInteger() 2166 if (ShAmt) { in insertInteger() 2167 V = IRB.CreateShl(V, ShAmt, Name + ".shift"); in insertInteger() 2171 if (ShAmt || Ty->getBitWidth() < IntTy->getBitWidth()) { in insertInteger() 2172 APInt Mask = ~Ty->getMask().zext(IntTy->getBitWidth()).shl(ShAmt); in insertInteger()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/ARM/MCTargetDesc/ |
D | ARMInstPrinter.cpp | 1322 unsigned ShAmt = MO3.getImm(); in printT2AddrModeSoRegOperand() local 1323 if (ShAmt) { in printT2AddrModeSoRegOperand() 1324 assert(ShAmt <= 3 && "Not a valid Thumb2 addressing mode!"); in printT2AddrModeSoRegOperand() 1325 O << ", lsl " << markup("<imm:") << "#" << ShAmt << markup(">"); in printT2AddrModeSoRegOperand()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Hexagon/ |
D | HexagonLoopIdiomRecognition.cpp | 1424 Value *ShAmt = CIV, *ShVal = Op; in convertShiftsToLeft() local 1426 auto *ATy = cast<IntegerType>(ShAmt->getType()); in convertShiftsToLeft() 1435 ShAmt = upcast(CastMap, IRB, ShAmt, VTy); in convertShiftsToLeft() 1438 W = IRB.CreateShl(ShVal, ShAmt); in convertShiftsToLeft()
|