Lines Matching refs:SDI
817 static bool processSRem(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSRem() argument
818 assert(SDI->getOpcode() == Instruction::SRem); in processSRem()
819 if (SDI->getType()->isVectorTy()) in processSRem()
828 for (const auto I : zip(Ops, SDI->operands())) { in processSRem()
831 Op.D = getDomain(Op.V, LVI, SDI); in processSRem()
844 BinaryOperator::CreateNeg(Op.V, Op.V->getName() + ".nonneg", SDI); in processSRem()
845 BO->setDebugLoc(SDI->getDebugLoc()); in processSRem()
850 BinaryOperator::CreateURem(Ops[0].V, Ops[1].V, SDI->getName(), SDI); in processSRem()
851 URem->setDebugLoc(SDI->getDebugLoc()); in processSRem()
857 Res = BinaryOperator::CreateNeg(Res, Res->getName() + ".neg", SDI); in processSRem()
859 SDI->replaceAllUsesWith(Res); in processSRem()
860 SDI->eraseFromParent(); in processSRem()
873 static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSDiv() argument
874 assert(SDI->getOpcode() == Instruction::SDiv); in processSDiv()
875 if (SDI->getType()->isVectorTy()) in processSDiv()
884 for (const auto I : zip(Ops, SDI->operands())) { in processSDiv()
887 Op.D = getDomain(Op.V, LVI, SDI); in processSDiv()
900 BinaryOperator::CreateNeg(Op.V, Op.V->getName() + ".nonneg", SDI); in processSDiv()
901 BO->setDebugLoc(SDI->getDebugLoc()); in processSDiv()
906 BinaryOperator::CreateUDiv(Ops[0].V, Ops[1].V, SDI->getName(), SDI); in processSDiv()
907 UDiv->setDebugLoc(SDI->getDebugLoc()); in processSDiv()
908 UDiv->setIsExact(SDI->isExact()); in processSDiv()
914 Res = BinaryOperator::CreateNeg(Res, Res->getName() + ".neg", SDI); in processSDiv()
916 SDI->replaceAllUsesWith(Res); in processSDiv()
917 SDI->eraseFromParent(); in processSDiv()
942 static bool processAShr(BinaryOperator *SDI, LazyValueInfo *LVI) { in processAShr() argument
943 if (SDI->getType()->isVectorTy()) in processAShr()
946 ConstantRange LRange = LVI->getConstantRange(SDI->getOperand(0), SDI); in processAShr()
947 unsigned OrigWidth = SDI->getType()->getIntegerBitWidth(); in processAShr()
953 SDI->replaceAllUsesWith(SDI->getOperand(0)); in processAShr()
954 SDI->eraseFromParent(); in processAShr()
958 if (!isNonNegative(SDI->getOperand(0), LVI, SDI)) in processAShr()
962 auto *BO = BinaryOperator::CreateLShr(SDI->getOperand(0), SDI->getOperand(1), in processAShr()
963 "", SDI); in processAShr()
964 BO->takeName(SDI); in processAShr()
965 BO->setDebugLoc(SDI->getDebugLoc()); in processAShr()
966 BO->setIsExact(SDI->isExact()); in processAShr()
967 SDI->replaceAllUsesWith(BO); in processAShr()
968 SDI->eraseFromParent(); in processAShr()
973 static bool processSExt(SExtInst *SDI, LazyValueInfo *LVI) { in processSExt() argument
974 if (SDI->getType()->isVectorTy()) in processSExt()
977 Value *Base = SDI->getOperand(0); in processSExt()
979 if (!isNonNegative(Base, LVI, SDI)) in processSExt()
983 auto *ZExt = CastInst::CreateZExtOrBitCast(Base, SDI->getType(), "", SDI); in processSExt()
984 ZExt->takeName(SDI); in processSExt()
985 ZExt->setDebugLoc(SDI->getDebugLoc()); in processSExt()
986 SDI->replaceAllUsesWith(ZExt); in processSExt()
987 SDI->eraseFromParent(); in processSExt()