/external/llvm/lib/CodeGen/SelectionDAG/ |
D | TargetLowering.cpp | 661 unsigned ShAmt = SA->getZExtValue(); in SimplifyDemandedBits() local 665 if (ShAmt >= BitWidth) in SimplifyDemandedBits() 673 if (ShAmt && (NewMask & APInt::getLowBitsSet(BitWidth, ShAmt)) == 0) { in SimplifyDemandedBits() 676 int Diff = ShAmt-C1; in SimplifyDemandedBits() 690 if (SimplifyDemandedBits(InOp, NewMask.lshr(ShAmt), in SimplifyDemandedBits() 700 if (ShAmt < InnerBits && NewMask.lshr(InnerBits) == 0 && in SimplifyDemandedBits() 703 if (!APInt(BitWidth, ShAmt).isIntN(ShTy.getSizeInBits())) in SimplifyDemandedBits() 707 TLO.DAG.getConstant(ShAmt, dl, ShTy)); in SimplifyDemandedBits() 724 if (InnerShAmt < ShAmt && in SimplifyDemandedBits() 726 NewMask.lshr(InnerBits - InnerShAmt + ShAmt) == 0 && in SimplifyDemandedBits() [all …]
|
D | LegalizeVectorOps.cpp | 577 SDValue Lo, Hi, ShAmt; in ExpandLoad() local 580 ShAmt = DAG.getConstant( in ExpandLoad() 582 Lo = DAG.getNode(ISD::SRL, dl, WideVT, LoadVals[WideIdx], ShAmt); in ExpandLoad() 591 ShAmt = DAG.getConstant( in ExpandLoad() 594 Hi = DAG.getNode(ISD::SHL, dl, WideVT, LoadVals[WideIdx], ShAmt); in ExpandLoad() 611 ShAmt = in ExpandLoad() 614 Lo = DAG.getNode(ISD::SHL, dl, WideVT, Lo, ShAmt); in ExpandLoad() 615 Lo = DAG.getNode(ISD::SRA, dl, WideVT, Lo, ShAmt); in ExpandLoad()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 369 Constant *ShAmt = ConstantExpr::getZExt(Op1, TrOp->getType()); in FoldShiftByConstant() local 371 Value *NSh = Builder->CreateBinOp(I.getOpcode(), TrOp, ShAmt,I.getName()); in FoldShiftByConstant() 639 unsigned ShAmt = Op1C->getZExtValue(); in visitShl() local 644 APInt::getHighBitsSet(Op1C->getBitWidth(), ShAmt))) { in visitShl() 651 ComputeNumSignBits(I.getOperand(0)) > ShAmt) { in visitShl() 678 unsigned ShAmt = Op1C->getZExtValue(); in visitLShr() local 688 isPowerOf2_32(BitWidth) && Log2_32(BitWidth) == ShAmt) { in visitLShr() 698 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt))){ in visitLShr() 718 unsigned ShAmt = Op1C->getZExtValue(); in visitAShr() local 744 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt))){ in visitAShr()
|
D | InstCombineCompares.cpp | 903 ConstantInt *ShAmt) { in FoldICmpShrCst() argument 910 uint32_t ShAmtVal = (uint32_t)ShAmt->getLimitedValue(TypeBits); in FoldICmpShrCst() 1123 ConstantInt *ShAmt; in visitICmpInstWithInstAndIntCst() local 1124 ShAmt = Shift ? dyn_cast<ConstantInt>(Shift->getOperand(1)) : 0; in visitICmpInstWithInstAndIntCst() 1131 if (ShAmt) { in visitICmpInstWithInstAndIntCst() 1137 int ShAmtVal = TyBits - ShAmt->getLimitedValue(TyBits); in visitICmpInstWithInstAndIntCst() 1148 NewCst = ConstantExpr::getLShr(RHS, ShAmt); in visitICmpInstWithInstAndIntCst() 1150 NewCst = ConstantExpr::getShl(RHS, ShAmt); in visitICmpInstWithInstAndIntCst() 1155 NewCst, ShAmt) != RHS) { in visitICmpInstWithInstAndIntCst() 1169 NewAndCST = ConstantExpr::getLShr(AndCST, ShAmt); in visitICmpInstWithInstAndIntCst() [all …]
|
D | InstCombineCasts.cpp | 1090 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local 1091 return BinaryOperator::CreateAShr(Builder->CreateShl(Res, ShAmt, "sext"), in visitSExt() 1092 ShAmt); in visitSExt() 1103 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local 1104 Value *Res = Builder->CreateShl(TI->getOperand(0), ShAmt, "sext"); in visitSExt() 1105 return BinaryOperator::CreateAShr(Res, ShAmt); in visitSExt() 1132 unsigned ShAmt = CA->getZExtValue()+SrcDstSize-MidSize; in visitSExt() local 1133 Constant *ShAmtV = ConstantInt::get(CI.getType(), ShAmt); in visitSExt() 1625 ConstantInt *ShAmt = 0; in OptimizeIntToFloatBitCast() local 1627 m_ConstantInt(ShAmt)))) && in OptimizeIntToFloatBitCast() [all …]
|
D | InstCombineAddSub.cpp | 135 Constant *ShAmt = ConstantInt::get(I.getType(), ExtendAmt); in visitAdd() local 136 Value *NewShl = Builder->CreateShl(XorLHS, ShAmt, "sext"); in visitAdd() 137 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd()
|
/external/swiftshader/third_party/LLVM/lib/CodeGen/SelectionDAG/ |
D | TargetLowering.cpp | 1438 unsigned ShAmt = SA->getZExtValue(); in SimplifyDemandedBits() local 1442 if (ShAmt >= BitWidth) in SimplifyDemandedBits() 1450 if (ShAmt && (NewMask & APInt::getLowBitsSet(BitWidth, ShAmt)) == 0) { in SimplifyDemandedBits() 1453 int Diff = ShAmt-C1; in SimplifyDemandedBits() 1467 if (SimplifyDemandedBits(InOp, NewMask.lshr(ShAmt), in SimplifyDemandedBits() 1481 if (!APInt(BitWidth, ShAmt).isIntN(ShTy.getSizeInBits())) in SimplifyDemandedBits() 1485 TLO.DAG.getConstant(ShAmt, ShTy)); in SimplifyDemandedBits() 1502 unsigned ShAmt = SA->getZExtValue(); in SimplifyDemandedBits() local 1507 if (ShAmt >= BitWidth) in SimplifyDemandedBits() 1515 if (ShAmt && (NewMask & APInt::getHighBitsSet(VTSize, ShAmt)) == 0) { in SimplifyDemandedBits() [all …]
|
D | DAGCombiner.cpp | 2718 SDValue ShAmt = DAG.getConstant(16, getShiftAmountTy(VT)); in MatchBSwapHWord() local 2720 return DAG.getNode(ISD::ROTL, N->getDebugLoc(), VT, BSwap, ShAmt); in MatchBSwapHWord() 2722 return DAG.getNode(ISD::ROTR, N->getDebugLoc(), VT, BSwap, ShAmt); in MatchBSwapHWord() 2724 DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, BSwap, ShAmt), in MatchBSwapHWord() 2725 DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, BSwap, ShAmt)); in MatchBSwapHWord() 3572 uint64_t ShAmt = N1C->getZExtValue()+64-N0.getValueSizeInBits(); in visitSRL() local 3574 DAG.getConstant(~0ULL >> ShAmt, VT)); in visitSRL() 3624 unsigned ShAmt = UnknownBits.countTrailingZeros(); in visitSRL() local 3627 if (ShAmt) { in visitSRL() 3629 DAG.getConstant(ShAmt, getShiftAmountTy(Op.getValueType()))); in visitSRL() [all …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 381 Constant *ShAmt = ConstantExpr::getZExt(COp1, TrOp->getType()); in FoldShiftByConstant() local 383 Value *NSh = Builder->CreateBinOp(I.getOpcode(), TrOp, ShAmt,I.getName()); in FoldShiftByConstant() 709 unsigned ShAmt = Op1C->getZExtValue(); in visitShl() local 714 APInt::getHighBitsSet(Op1C->getBitWidth(), ShAmt), 0, in visitShl() 722 ComputeNumSignBits(I.getOperand(0), 0, &I) > ShAmt) { in visitShl() 752 unsigned ShAmt = Op1C->getZExtValue(); in visitLShr() local 762 isPowerOf2_32(BitWidth) && Log2_32(BitWidth) == ShAmt) { in visitLShr() 772 MaskedValueIsZero(Op0, APInt::getLowBitsSet(Op1C->getBitWidth(), ShAmt), in visitLShr() 796 unsigned ShAmt = Op1C->getZExtValue(); in visitAShr() local 817 MaskedValueIsZero(Op0, APInt::getLowBitsSet(Op1C->getBitWidth(), ShAmt), in visitAShr()
|
D | InstCombineCompares.cpp | 1343 ConstantInt *ShAmt) { in FoldICmpShrCst() argument 1350 uint32_t ShAmtVal = (uint32_t)ShAmt->getLimitedValue(TypeBits); in FoldICmpShrCst() 1686 ConstantInt *ShAmt; in visitICmpInstWithInstAndIntCst() local 1687 ShAmt = Shift ? dyn_cast<ConstantInt>(Shift->getOperand(1)) : nullptr; in visitICmpInstWithInstAndIntCst() 1692 if (ShAmt) { in visitICmpInstWithInstAndIntCst() 1717 cast<ConstantInt>(ConstantExpr::getShl(AndCst, ShAmt)); in visitICmpInstWithInstAndIntCst() 1719 cast<ConstantInt>(ConstantExpr::getShl(RHS, ShAmt)); in visitICmpInstWithInstAndIntCst() 1729 NewCst = ConstantExpr::getLShr(RHS, ShAmt); in visitICmpInstWithInstAndIntCst() 1731 NewCst = ConstantExpr::getShl(RHS, ShAmt); in visitICmpInstWithInstAndIntCst() 1735 if (ConstantExpr::get(ShiftOpcode, NewCst, ShAmt) != RHS) { in visitICmpInstWithInstAndIntCst() [all …]
|
D | InstCombineCasts.cpp | 642 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp() local 644 if (ShAmt) { in transformZExtICmp() 647 In = Builder->CreateLShr(In, ConstantInt::get(In->getType(), ShAmt), in transformZExtICmp() 1164 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local 1165 return BinaryOperator::CreateAShr(Builder->CreateShl(Res, ShAmt, "sext"), in visitSExt() 1166 ShAmt); in visitSExt() 1177 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize); in visitSExt() local 1178 Value *Res = Builder->CreateShl(TI->getOperand(0), ShAmt, "sext"); in visitSExt() 1179 return BinaryOperator::CreateAShr(Res, ShAmt); in visitSExt() 1206 unsigned ShAmt = CA->getZExtValue()+SrcDstSize-MidSize; in visitSExt() local [all …]
|
/external/swiftshader/third_party/LLVM/lib/Target/ARM/ |
D | ARMISelDAGToDAG.cpp | 97 ARM_AM::ShiftOpc ShOpcVal, unsigned ShAmt); 381 unsigned ShAmt) { in isShifterOpProfitable() argument 387 return ShOpcVal == ARM_AM::lsl && ShAmt == 2; in isShifterOpProfitable() 506 unsigned ShAmt = Log2_32(RHSC); in SelectLdStSOReg() local 508 Opc = CurDAG->getTargetConstant(ARM_AM::getAM2Opc(AddSub, ShAmt, in SelectLdStSOReg() 534 unsigned ShAmt = 0; in SelectLdStSOReg() local 544 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg() 545 if (isShifterOpProfitable(Offset, ShOpcVal, ShAmt)) in SelectLdStSOReg() 548 ShAmt = 0; in SelectLdStSOReg() 565 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | ScalarReplAggregates.cpp | 736 int ShAmt = 0; in ConvertScalar_ExtractValue() local 741 ShAmt = TD.getTypeStoreSizeInBits(NTy) - in ConvertScalar_ExtractValue() 744 ShAmt = Offset; in ConvertScalar_ExtractValue() 750 if (ShAmt > 0 && (unsigned)ShAmt < NTy->getBitWidth()) in ConvertScalar_ExtractValue() 752 ConstantInt::get(FromVal->getType(), ShAmt)); in ConvertScalar_ExtractValue() 753 else if (ShAmt < 0 && (unsigned)-ShAmt < NTy->getBitWidth()) in ConvertScalar_ExtractValue() 755 ConstantInt::get(FromVal->getType(), -ShAmt)); in ConvertScalar_ExtractValue() 863 int ShAmt = 0; in ConvertScalar_InsertValue() local 868 ShAmt = DestStoreWidth - SrcStoreWidth - Offset; in ConvertScalar_InsertValue() 870 ShAmt = Offset; in ConvertScalar_InsertValue() [all …]
|
/external/llvm/lib/Target/ARM/ |
D | ARMISelDAGToDAG.cpp | 89 ARM_AM::ShiftOpc ShOpcVal, unsigned ShAmt); 465 unsigned ShAmt) { in isShifterOpProfitable() argument 472 (ShAmt == 2 || (Subtarget->isSwift() && ShAmt == 1)); in isShifterOpProfitable() 666 unsigned ShAmt = Log2_32(RHSC); in SelectLdStSOReg() local 668 Opc = CurDAG->getTargetConstant(ARM_AM::getAM2Opc(AddSub, ShAmt, in SelectLdStSOReg() 694 unsigned ShAmt = 0; in SelectLdStSOReg() local 704 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg() 705 if (isShifterOpProfitable(Offset, ShOpcVal, ShAmt)) in SelectLdStSOReg() 708 ShAmt = 0; in SelectLdStSOReg() 726 ShAmt = Sh->getZExtValue(); in SelectLdStSOReg() [all …]
|
/external/swiftshader/third_party/subzero/src/ |
D | IceTargetLoweringARM32.cpp | 555 const int32_t ShAmt = (DestTy == IceType_i16) ? 16 : 24; in genTargetHelperCallFor() local 558 NewC &= ~(0x80000000l >> ShAmt); in genTargetHelperCallFor() 560 NewC = (NewC << ShAmt) >> ShAmt; in genTargetHelperCallFor() 2803 const int32_t ShAmt = SrcsLo.getConstantValue() & 0x3F; in lowerInt64Arithmetic() local 2804 if (ShAmt == 0) { in lowerInt64Arithmetic() 2810 if (ShAmt >= 32) { in lowerInt64Arithmetic() 2811 if (ShAmt == 32) { in lowerInt64Arithmetic() 2814 Operand *ShAmtImm = shAmtImm(ShAmt - 32); in lowerInt64Arithmetic() 2836 Operand *ShAmtImm = shAmtImm(ShAmt); in lowerInt64Arithmetic() 2837 Operand *ComplShAmtImm = shAmtImm(32 - ShAmt); in lowerInt64Arithmetic() [all …]
|
/external/llvm/lib/IR/ |
D | ConstantFold.cpp | 271 unsigned ShAmt = Amt->getZExtValue(); in ExtractConstantBytes() local 273 if ((ShAmt & 7) != 0) in ExtractConstantBytes() 275 ShAmt >>= 3; in ExtractConstantBytes() 278 if (ByteStart >= CSize-ShAmt) in ExtractConstantBytes() 282 if (ByteStart+ByteSize+ShAmt <= CSize) in ExtractConstantBytes() 283 return ExtractConstantBytes(CE->getOperand(0), ByteStart+ShAmt, ByteSize); in ExtractConstantBytes() 293 unsigned ShAmt = Amt->getZExtValue(); in ExtractConstantBytes() local 295 if ((ShAmt & 7) != 0) in ExtractConstantBytes() 297 ShAmt >>= 3; in ExtractConstantBytes() 300 if (ByteStart+ByteSize <= ShAmt) in ExtractConstantBytes() [all …]
|
/external/clang/lib/Lex/ |
D | PPExpressions.cpp | 673 unsigned ShAmt = static_cast<unsigned>(RHS.Val.getLimitedValue()); in EvaluateDirectiveSubExpr() local 674 if (ShAmt >= LHS.getBitWidth()) { in EvaluateDirectiveSubExpr() 676 ShAmt = LHS.getBitWidth()-1; in EvaluateDirectiveSubExpr() 678 Res = LHS.Val >> ShAmt; in EvaluateDirectiveSubExpr()
|
/external/swiftshader/third_party/LLVM/lib/VMCore/ |
D | ConstantFold.cpp | 253 unsigned ShAmt = Amt->getZExtValue(); in ExtractConstantBytes() local 255 if ((ShAmt & 7) != 0) in ExtractConstantBytes() 257 ShAmt >>= 3; in ExtractConstantBytes() 260 if (ByteStart >= CSize-ShAmt) in ExtractConstantBytes() 264 if (ByteStart+ByteSize+ShAmt <= CSize) in ExtractConstantBytes() 265 return ExtractConstantBytes(CE->getOperand(0), ByteStart+ShAmt, ByteSize); in ExtractConstantBytes() 275 unsigned ShAmt = Amt->getZExtValue(); in ExtractConstantBytes() local 277 if ((ShAmt & 7) != 0) in ExtractConstantBytes() 279 ShAmt >>= 3; in ExtractConstantBytes() 282 if (ByteStart+ByteSize <= ShAmt) in ExtractConstantBytes() [all …]
|
/external/llvm/lib/Support/ |
D | APInt.cpp | 2061 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const { in sshl_ov() argument 2062 Overflow = ShAmt.uge(getBitWidth()); in sshl_ov() 2067 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov() 2069 Overflow = ShAmt.uge(countLeadingOnes()); in sshl_ov() 2071 return *this << ShAmt; in sshl_ov() 2074 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const { in ushl_ov() argument 2075 Overflow = ShAmt.uge(getBitWidth()); in ushl_ov() 2079 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov() 2081 return *this << ShAmt; in ushl_ov()
|
/external/swiftshader/third_party/llvm-subzero/lib/Support/ |
D | APInt.cpp | 2035 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const { in sshl_ov() argument 2036 Overflow = ShAmt.uge(getBitWidth()); in sshl_ov() 2041 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov() 2043 Overflow = ShAmt.uge(countLeadingOnes()); in sshl_ov() 2045 return *this << ShAmt; in sshl_ov() 2048 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const { in ushl_ov() argument 2049 Overflow = ShAmt.uge(getBitWidth()); in ushl_ov() 2053 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov() 2055 return *this << ShAmt; in ushl_ov()
|
/external/swiftshader/third_party/LLVM/lib/Target/ARM/InstPrinter/ |
D | ARMInstPrinter.cpp | 947 unsigned ShAmt = MO3.getImm(); in printT2AddrModeSoRegOperand() local 948 if (ShAmt) { in printT2AddrModeSoRegOperand() 949 assert(ShAmt <= 3 && "Not a valid Thumb2 addressing mode!"); in printT2AddrModeSoRegOperand() 950 O << ", lsl #" << ShAmt; in printT2AddrModeSoRegOperand()
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXISelLowering.cpp | 1713 SDValue ShAmt = Op.getOperand(2); in LowerShiftRightParts() local 1723 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts() 1725 ShAmt); in LowerShiftRightParts() 1742 ShAmt); in LowerShiftRightParts() 1743 SDValue Tmp1 = DAG.getNode(ISD::SRL, dl, VT, ShOpLo, ShAmt); in LowerShiftRightParts() 1744 SDValue ExtraShAmt = DAG.getNode(ISD::SUB, dl, MVT::i32, ShAmt, in LowerShiftRightParts() 1750 SDValue Cmp = DAG.getSetCC(dl, MVT::i1, ShAmt, in LowerShiftRightParts() 1753 SDValue Hi = DAG.getNode(Opc, dl, VT, ShOpHi, ShAmt); in LowerShiftRightParts() 1776 SDValue ShAmt = Op.getOperand(2); in LowerShiftLeftParts() local 1786 ShAmt); in LowerShiftLeftParts() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Target/X86/ |
D | X86InstrInfo.cpp | 1362 unsigned ShAmt = MI->getOperand(2).getImm(); in convertToThreeAddressWithLEA() local 1363 MIB.addReg(0).addImm(1 << ShAmt) in convertToThreeAddressWithLEA() 1476 unsigned ShAmt = MI->getOperand(2).getImm(); in convertToThreeAddress() local 1477 if (ShAmt == 0 || ShAmt >= 4) return 0; in convertToThreeAddress() 1486 .addReg(0).addImm(1 << ShAmt) in convertToThreeAddress() 1495 unsigned ShAmt = MI->getOperand(2).getImm(); in convertToThreeAddress() local 1496 if (ShAmt == 0 || ShAmt >= 4) return 0; in convertToThreeAddress() 1506 .addReg(0).addImm(1 << ShAmt) in convertToThreeAddress() 1514 unsigned ShAmt = MI->getOperand(2).getImm(); in convertToThreeAddress() local 1515 if (ShAmt == 0 || ShAmt >= 4) return 0; in convertToThreeAddress() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Target/Alpha/ |
D | AlphaISelLowering.cpp | 593 SDValue ShAmt = Op.getOperand(2); in LowerOperation() local 595 DAG.getConstant(64, MVT::i64), ShAmt); in LowerOperation() 605 SDValue Hi_Pos = DAG.getNode(ISD::SRL, dl, MVT::i64, ShOpHi, ShAmt); in LowerOperation() 606 SDValue Lo_Pos = DAG.getNode(ISD::SRL, dl, MVT::i64, ShOpLo, ShAmt); in LowerOperation()
|
/external/llvm/lib/Target/Lanai/ |
D | LanaiISelLowering.cpp | 1245 SDValue ShAmt = Op.getOperand(2); in LowerSRL_PARTS() local 1260 ISD::SUB, dl, MVT::i32, DAG.getConstant(VTBits, dl, MVT::i32), ShAmt); in LowerSRL_PARTS() 1263 SDValue Hi = DAG.getNode(ISD::SRL, dl, MVT::i32, ShOpHi, ShAmt); in LowerSRL_PARTS() 1266 SDValue Lo = DAG.getNode(ISD::SRL, dl, MVT::i32, ShOpLo, ShAmt); in LowerSRL_PARTS() 1270 SDValue ShiftIsZero = DAG.getSetCC(dl, MVT::i32, ShAmt, Zero, ISD::SETEQ); in LowerSRL_PARTS()
|