Home
last modified time | relevance | path

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

12

/external/llvm/lib/CodeGen/SelectionDAG/
DTargetLowering.cpp607 unsigned ShAmt = SA->getZExtValue(); in SimplifyDemandedBits() local
611 if (ShAmt >= BitWidth) in SimplifyDemandedBits()
619 if (ShAmt && (NewMask & APInt::getLowBitsSet(BitWidth, ShAmt)) == 0) { in SimplifyDemandedBits()
622 int Diff = ShAmt-C1; in SimplifyDemandedBits()
636 if (SimplifyDemandedBits(InOp, NewMask.lshr(ShAmt), in SimplifyDemandedBits()
646 if (ShAmt < InnerBits && NewMask.lshr(InnerBits) == 0 && in SimplifyDemandedBits()
649 if (!APInt(BitWidth, ShAmt).isIntN(ShTy.getSizeInBits())) in SimplifyDemandedBits()
653 TLO.DAG.getConstant(ShAmt, ShTy)); in SimplifyDemandedBits()
670 if (InnerShAmt < ShAmt && in SimplifyDemandedBits()
672 NewMask.lshr(InnerBits - InnerShAmt + ShAmt) == 0 && in SimplifyDemandedBits()
[all …]
DLegalizeVectorOps.cpp554 SDValue Lo, Hi, ShAmt; in ExpandLoad() local
557 ShAmt = DAG.getConstant(BitOffset, TLI.getShiftAmountTy(WideVT)); in ExpandLoad()
558 Lo = DAG.getNode(ISD::SRL, dl, WideVT, LoadVals[WideIdx], ShAmt); in ExpandLoad()
567 ShAmt = DAG.getConstant(SrcEltBits - BitOffset, in ExpandLoad()
569 Hi = DAG.getNode(ISD::SHL, dl, WideVT, LoadVals[WideIdx], ShAmt); in ExpandLoad()
586 ShAmt = DAG.getConstant(WideBits - SrcEltBits, in ExpandLoad()
588 Lo = DAG.getNode(ISD::SHL, dl, WideVT, Lo, ShAmt); in ExpandLoad()
589 Lo = DAG.getNode(ISD::SRA, dl, WideVT, Lo, ShAmt); in ExpandLoad()
DDAGCombiner.cpp3358 SDValue ShAmt = DAG.getConstant(16, getShiftAmountTy(VT)); in MatchBSwapHWord() local
3360 return DAG.getNode(ISD::ROTL, SDLoc(N), VT, BSwap, ShAmt); in MatchBSwapHWord()
3362 return DAG.getNode(ISD::ROTR, SDLoc(N), VT, BSwap, ShAmt); in MatchBSwapHWord()
3364 DAG.getNode(ISD::SHL, SDLoc(N), VT, BSwap, ShAmt), in MatchBSwapHWord()
3365 DAG.getNode(ISD::SRL, SDLoc(N), VT, BSwap, ShAmt)); in MatchBSwapHWord()
4536 uint64_t ShAmt = N1C->getZExtValue() + 64 - BitSize; in visitSRL() local
4538 DAG.getConstant(~0ULL >> ShAmt, VT)); in visitSRL()
4591 unsigned ShAmt = UnknownBits.countTrailingZeros(); in visitSRL() local
4594 if (ShAmt) { in visitSRL()
4596 DAG.getConstant(ShAmt, getShiftAmountTy(Op.getValueType()))); in visitSRL()
[all …]
DSelectionDAG.cpp2092 unsigned ShAmt = SA->getZExtValue(); in computeKnownBits() local
2095 if (ShAmt >= BitWidth) in computeKnownBits()
2099 KnownZero <<= ShAmt; in computeKnownBits()
2100 KnownOne <<= ShAmt; in computeKnownBits()
2102 KnownZero |= APInt::getLowBitsSet(BitWidth, ShAmt); in computeKnownBits()
2108 unsigned ShAmt = SA->getZExtValue(); in computeKnownBits() local
2111 if (ShAmt >= BitWidth) in computeKnownBits()
2115 KnownZero = KnownZero.lshr(ShAmt); in computeKnownBits()
2116 KnownOne = KnownOne.lshr(ShAmt); in computeKnownBits()
2118 APInt HighBits = APInt::getHighBitsSet(BitWidth, ShAmt); in computeKnownBits()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombineShifts.cpp380 Constant *ShAmt = ConstantExpr::getZExt(COp1, TrOp->getType()); in FoldShiftByConstant() local
382 Value *NSh = Builder->CreateBinOp(I.getOpcode(), TrOp, ShAmt,I.getName()); in FoldShiftByConstant()
708 unsigned ShAmt = Op1C->getZExtValue(); in visitShl() local
713 APInt::getHighBitsSet(Op1C->getBitWidth(), ShAmt), in visitShl()
721 ComputeNumSignBits(I.getOperand(0), 0, &I) > ShAmt) { in visitShl()
751 unsigned ShAmt = Op1C->getZExtValue(); in visitLShr() local
761 isPowerOf2_32(BitWidth) && Log2_32(BitWidth) == ShAmt) { in visitLShr()
771 MaskedValueIsZero(Op0, APInt::getLowBitsSet(Op1C->getBitWidth(), ShAmt), in visitLShr()
795 unsigned ShAmt = Op1C->getZExtValue(); in visitAShr() local
816 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt), in visitAShr()
DInstCombineCompares.cpp948 ConstantInt *ShAmt) { in FoldICmpShrCst() argument
955 uint32_t ShAmtVal = (uint32_t)ShAmt->getLimitedValue(TypeBits); in FoldICmpShrCst()
1281 ConstantInt *ShAmt; in visitICmpInstWithInstAndIntCst() local
1282 ShAmt = Shift ? dyn_cast<ConstantInt>(Shift->getOperand(1)) : nullptr; in visitICmpInstWithInstAndIntCst()
1287 if (ShAmt) { in visitICmpInstWithInstAndIntCst()
1312 cast<ConstantInt>(ConstantExpr::getShl(AndCst, ShAmt)); in visitICmpInstWithInstAndIntCst()
1314 cast<ConstantInt>(ConstantExpr::getShl(RHS, ShAmt)); in visitICmpInstWithInstAndIntCst()
1324 NewCst = ConstantExpr::getLShr(RHS, ShAmt); in visitICmpInstWithInstAndIntCst()
1326 NewCst = ConstantExpr::getShl(RHS, ShAmt); in visitICmpInstWithInstAndIntCst()
1330 if (ConstantExpr::get(ShiftOpcode, NewCst, ShAmt) != RHS) { in visitICmpInstWithInstAndIntCst()
[all …]
DInstCombineCasts.cpp1091 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local
1092 return BinaryOperator::CreateAShr(Builder->CreateShl(Res, ShAmt, "sext"), in visitSExt()
1093 ShAmt); in visitSExt()
1104 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local
1105 Value *Res = Builder->CreateShl(TI->getOperand(0), ShAmt, "sext"); in visitSExt()
1106 return BinaryOperator::CreateAShr(Res, ShAmt); in visitSExt()
1133 unsigned ShAmt = CA->getZExtValue()+SrcDstSize-MidSize; in visitSExt() local
1134 Constant *ShAmtV = ConstantInt::get(CI.getType(), ShAmt); in visitSExt()
1720 ConstantInt *ShAmt = nullptr; in OptimizeIntToFloatBitCast() local
1722 m_ConstantInt(ShAmt)))) && in OptimizeIntToFloatBitCast()
[all …]
DInstCombineAddSub.cpp1102 Constant *ShAmt = ConstantInt::get(I.getType(), ExtendAmt); in visitAdd() local
1103 Value *NewShl = Builder->CreateShl(XorLHS, ShAmt, "sext"); in visitAdd()
1104 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd()
DInstCombineMulDivRem.cpp1126 Value *ShAmt = llvm::ConstantInt::get(RHS->getType(), in visitSDiv() local
1128 return BinaryOperator::CreateExactAShr(Op0, ShAmt, I.getName()); in visitSDiv()
DInstCombineAndOrXor.cpp1548 unsigned ShAmt = in CollectBSwapParts() local
1551 if ((ShAmt & 7) || (ShAmt > 8*ByteValues.size())) in CollectBSwapParts()
1554 unsigned ByteShift = ShAmt >> 3; in CollectBSwapParts()
/external/llvm/lib/Target/ARM/
DARMISelDAGToDAG.cpp95 ARM_AM::ShiftOpc ShOpcVal, unsigned ShAmt);
457 unsigned ShAmt) { in isShifterOpProfitable() argument
464 (ShAmt == 2 || (Subtarget->isSwift() && ShAmt == 1)); in isShifterOpProfitable()
582 unsigned ShAmt = Log2_32(RHSC); in SelectLdStSOReg() local
584 Opc = CurDAG->getTargetConstant(ARM_AM::getAM2Opc(AddSub, ShAmt, in SelectLdStSOReg()
610 unsigned ShAmt = 0; in SelectLdStSOReg() local
620 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg()
621 if (isShifterOpProfitable(Offset, ShOpcVal, ShAmt)) in SelectLdStSOReg()
624 ShAmt = 0; in SelectLdStSOReg()
642 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg()
[all …]
DARMBaseInstrInfo.cpp3455 unsigned ShAmt = DefMI->getOperand(3).getImm(); in adjustDefLatency() local
3456 if (ShAmt == 0 || ShAmt == 2) in adjustDefLatency()
3486 unsigned ShAmt = DefMI->getOperand(3).getImm(); in adjustDefLatency() local
3487 if (ShAmt == 0 || ShAmt == 1 || ShAmt == 2 || ShAmt == 3) in adjustDefLatency()
3756 unsigned ShAmt = in getOperandLatency() local
3758 if (ShAmt == 0 || ShAmt == 2) in getOperandLatency()
DARMISelLowering.cpp4075 SDValue ShAmt = Op.getOperand(2); in LowerShiftRightParts() local
4082 DAG.getConstant(VTBits, MVT::i32), ShAmt); in LowerShiftRightParts()
4083 SDValue Tmp1 = DAG.getNode(ISD::SRL, dl, VT, ShOpLo, ShAmt); in LowerShiftRightParts()
4084 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i32, ShAmt, in LowerShiftRightParts()
4093 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts()
4111 SDValue ShAmt = Op.getOperand(2); in LowerShiftLeftParts() local
4116 DAG.getConstant(VTBits, MVT::i32), ShAmt); in LowerShiftLeftParts()
4118 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i32, ShAmt, in LowerShiftLeftParts()
4120 SDValue Tmp2 = DAG.getNode(ISD::SHL, dl, VT, ShOpHi, ShAmt); in LowerShiftLeftParts()
4127 SDValue Lo = DAG.getNode(ISD::SHL, dl, VT, ShOpLo, ShAmt); in LowerShiftLeftParts()
[all …]
/external/llvm/lib/Transforms/Scalar/
DScalarReplAggregates.cpp844 int ShAmt = 0; in ConvertScalar_ExtractValue() local
849 ShAmt = DL.getTypeStoreSizeInBits(NTy) - in ConvertScalar_ExtractValue()
852 ShAmt = Offset; in ConvertScalar_ExtractValue()
858 if (ShAmt > 0 && (unsigned)ShAmt < NTy->getBitWidth()) in ConvertScalar_ExtractValue()
860 ConstantInt::get(FromVal->getType(), ShAmt)); in ConvertScalar_ExtractValue()
861 else if (ShAmt < 0 && (unsigned)-ShAmt < NTy->getBitWidth()) in ConvertScalar_ExtractValue()
863 ConstantInt::get(FromVal->getType(), -ShAmt)); in ConvertScalar_ExtractValue()
993 int ShAmt = 0; in ConvertScalar_InsertValue() local
998 ShAmt = DestStoreWidth - SrcStoreWidth - Offset; in ConvertScalar_InsertValue()
1000 ShAmt = Offset; in ConvertScalar_InsertValue()
[all …]
DSROA.cpp2239 uint64_t ShAmt = 8 * Offset; in extractInteger() local
2241 ShAmt = 8 * (DL.getTypeStoreSize(IntTy) - DL.getTypeStoreSize(Ty) - Offset); in extractInteger()
2242 if (ShAmt) { in extractInteger()
2243 V = IRB.CreateLShr(V, ShAmt, Name + ".shift"); in extractInteger()
2268 uint64_t ShAmt = 8 * Offset; in insertInteger() local
2270 ShAmt = 8 * (DL.getTypeStoreSize(IntTy) - DL.getTypeStoreSize(Ty) - Offset); in insertInteger()
2271 if (ShAmt) { in insertInteger()
2272 V = IRB.CreateShl(V, ShAmt, Name + ".shift"); in insertInteger()
2276 if (ShAmt || Ty->getBitWidth() < IntTy->getBitWidth()) { in insertInteger()
2277 APInt Mask = ~Ty->getMask().zext(IntTy->getBitWidth()).shl(ShAmt); in insertInteger()
/external/clang/lib/Lex/
DPPExpressions.cpp613 unsigned ShAmt = static_cast<unsigned>(RHS.Val.getLimitedValue()); in EvaluateDirectiveSubExpr() local
614 if (ShAmt >= LHS.getBitWidth()) in EvaluateDirectiveSubExpr()
615 Overflow = true, ShAmt = LHS.getBitWidth()-1; in EvaluateDirectiveSubExpr()
616 Res = LHS.Val >> ShAmt; in EvaluateDirectiveSubExpr()
/external/llvm/lib/IR/
DConstantFold.cpp270 unsigned ShAmt = Amt->getZExtValue(); in ExtractConstantBytes() local
272 if ((ShAmt & 7) != 0) in ExtractConstantBytes()
274 ShAmt >>= 3; in ExtractConstantBytes()
277 if (ByteStart >= CSize-ShAmt) in ExtractConstantBytes()
281 if (ByteStart+ByteSize+ShAmt <= CSize) in ExtractConstantBytes()
282 return ExtractConstantBytes(CE->getOperand(0), ByteStart+ShAmt, ByteSize); in ExtractConstantBytes()
292 unsigned ShAmt = Amt->getZExtValue(); in ExtractConstantBytes() local
294 if ((ShAmt & 7) != 0) in ExtractConstantBytes()
296 ShAmt >>= 3; in ExtractConstantBytes()
299 if (ByteStart+ByteSize <= ShAmt) in ExtractConstantBytes()
[all …]
/external/llvm/lib/Target/NVPTX/
DNVPTXISelLowering.cpp1666 SDValue ShAmt = Op.getOperand(2); in LowerShiftRightParts() local
1676 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts()
1678 ShAmt); in LowerShiftRightParts()
1694 DAG.getConstant(VTBits, MVT::i32), ShAmt); in LowerShiftRightParts()
1695 SDValue Tmp1 = DAG.getNode(ISD::SRL, dl, VT, ShOpLo, ShAmt); in LowerShiftRightParts()
1696 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i32, ShAmt, in LowerShiftRightParts()
1702 SDValue Cmp = DAG.getSetCC(dl, MVT::i1, ShAmt, in LowerShiftRightParts()
1704 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts()
1727 SDValue ShAmt = Op.getOperand(2); in LowerShiftLeftParts() local
1737 ShAmt); in LowerShiftLeftParts()
[all …]
/external/llvm/lib/Support/
DAPInt.cpp2067 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const { in sshl_ov() argument
2068 Overflow = ShAmt.uge(getBitWidth()); in sshl_ov()
2073 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov()
2075 Overflow = ShAmt.uge(countLeadingOnes()); in sshl_ov()
2077 return *this << ShAmt; in sshl_ov()
2080 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const { in ushl_ov() argument
2081 Overflow = ShAmt.uge(getBitWidth()); in ushl_ov()
2085 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov()
2087 return *this << ShAmt; in ushl_ov()
/external/llvm/lib/Target/ARM/InstPrinter/
DARMInstPrinter.cpp1342 unsigned ShAmt = MO3.getImm(); in printT2AddrModeSoRegOperand() local
1343 if (ShAmt) { in printT2AddrModeSoRegOperand()
1344 assert(ShAmt <= 3 && "Not a valid Thumb2 addressing mode!"); in printT2AddrModeSoRegOperand()
1345 O << ", lsl " << markup("<imm:") << "#" << ShAmt << markup(">"); in printT2AddrModeSoRegOperand()
/external/llvm/lib/Target/X86/
DX86InstrInfo.cpp2470 inline static bool isTruncatedShiftCountForLEA(unsigned ShAmt) { in isTruncatedShiftCountForLEA() argument
2476 return ShAmt < 4 && ShAmt > 0; in isTruncatedShiftCountForLEA()
2593 unsigned ShAmt = MI->getOperand(2).getImm(); in convertToThreeAddressWithLEA() local
2594 MIB.addReg(0).addImm(1 << ShAmt) in convertToThreeAddressWithLEA()
2698 unsigned ShAmt = getTruncatedShiftCount(MI, 2); in convertToThreeAddress() local
2699 if (!isTruncatedShiftCountForLEA(ShAmt)) return nullptr; in convertToThreeAddress()
2709 .addReg(0).addImm(1 << ShAmt).addOperand(Src).addImm(0).addReg(0); in convertToThreeAddress()
2714 unsigned ShAmt = getTruncatedShiftCount(MI, 2); in convertToThreeAddress() local
2715 if (!isTruncatedShiftCountForLEA(ShAmt)) return nullptr; in convertToThreeAddress()
2729 .addReg(0).addImm(1 << ShAmt) in convertToThreeAddress()
[all …]
DX86ISelLowering.cpp11348 SDValue ShAmt = Op.getOperand(2); in LowerShiftParts() local
11352 SDValue SafeShAmt = DAG.getNode(ISD::AND, dl, MVT::i8, ShAmt, in LowerShiftParts()
11360 Tmp2 = DAG.getNode(X86ISD::SHLD, dl, VT, ShOpHi, ShOpLo, ShAmt); in LowerShiftParts()
11363 Tmp2 = DAG.getNode(X86ISD::SHRD, dl, VT, ShOpLo, ShOpHi, ShAmt); in LowerShiftParts()
11370 SDValue AndNode = DAG.getNode(ISD::AND, dl, MVT::i8, ShAmt, in LowerShiftParts()
12601 unsigned ShAmt = Op->getConstantOperandVal(1); in EmitTest() local
12602 if (ShAmt >= BitWidth) // Avoid undefined shifts. in EmitTest()
12605 ? APInt::getHighBitsSet(BitWidth, BitWidth - ShAmt) in EmitTest()
12606 : APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt); in EmitTest()
14596 SDValue SrcOp, SDValue ShAmt, in getTargetVShiftNode() argument
[all …]
/external/llvm/lib/Analysis/
DValueTracking.cpp1952 const APInt *ShAmt; in ComputeNumSignBits() local
1953 if (match(U->getOperand(1), m_APInt(ShAmt))) { in ComputeNumSignBits()
1954 Tmp += ShAmt->getZExtValue(); in ComputeNumSignBits()
1960 const APInt *ShAmt; in ComputeNumSignBits() local
1961 if (match(U->getOperand(1), m_APInt(ShAmt))) { in ComputeNumSignBits()
1964 Tmp2 = ShAmt->getZExtValue(); in ComputeNumSignBits()
/external/llvm/include/llvm/IR/
DIRBuilder.h1599 uint64_t ShAmt = 8 * Offset; in CreateExtractInteger() local
1602 ShAmt = 8 * (DL.getTypeStoreSize(IntTy) - in CreateExtractInteger()
1604 if (ShAmt) { in CreateExtractInteger()
1605 V = CreateLShr(V, ShAmt, Name + ".shift"); in CreateExtractInteger()
/external/llvm/lib/Target/AArch64/
DAArch64ISelLowering.cpp4116 SDValue ShAmt = Op.getOperand(2); in LowerShiftRightParts() local
4123 DAG.getConstant(VTBits, MVT::i64), ShAmt); in LowerShiftRightParts()
4124 SDValue Tmp1 = DAG.getNode(ISD::SRL, dl, VT, ShOpLo, ShAmt); in LowerShiftRightParts()
4125 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i64, ShAmt, in LowerShiftRightParts()
4140 SDValue FalseValHi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts()
4162 SDValue ShAmt = Op.getOperand(2); in LowerShiftLeftParts() local
4167 DAG.getConstant(VTBits, MVT::i64), ShAmt); in LowerShiftLeftParts()
4169 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i64, ShAmt, in LowerShiftLeftParts()
4171 SDValue Tmp2 = DAG.getNode(ISD::SHL, dl, VT, ShOpHi, ShAmt); in LowerShiftLeftParts()
4185 SDValue FalseValLo = DAG.getNode(ISD::SHL, dl, VT, ShOpLo, ShAmt); in LowerShiftLeftParts()

12