Home
last modified time | relevance | path

Searched refs:hasNoSignedWrap (Results 1 – 25 of 74) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp108 bool HasAnyNoWrap = I.hasNoSignedWrap() || I.hasNoUnsignedWrap(); in foldMulSelectToNegate()
116 bool HasAnyNoWrap = I.hasNoSignedWrap() || I.hasNoUnsignedWrap(); in foldMulSelectToNegate()
148 const bool HasNSW = Mul.hasNoSignedWrap(); in foldMulShl1()
154 bool PropagateNSW = HasNSW && cast<ShlOperator>(Y)->hasNoSignedWrap(); in foldMulShl1()
165 bool PropagateNSW = HasNSW && Shift->hasNoSignedWrap(); in foldMulShl1()
192 simplifyMulInst(Op0, Op1, I.hasNoSignedWrap(), I.hasNoUnsignedWrap(), in visitMul()
210 const bool HasNSW = I.hasNoSignedWrap(); in visitMul()
235 if (HasNSW && Mul->hasNoSignedWrap() && Shl->isNotMinSignedValue()) in visitMul()
356 if (I.hasNoSignedWrap() && in visitMul()
375 if (HasNSW && cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap() && in visitMul()
[all …]
H A DInstCombineAddSub.cpp896 Res->setHasNoSignedWrap(Add.hasNoSignedWrap() && WillNotSOV); in foldAddWithConstant()
916 NewAdd->setHasNoSignedWrap(Add.hasNoSignedWrap() && in foldAddWithConstant()
930 if (Add.hasNoSignedWrap() || Add.hasNoUnsignedWrap()) in foldAddWithConstant()
1463 bool HasNSW = I.hasNoSignedWrap() && Op0->hasNoSignedWrap() && in factorizeMathWithShlOps()
1464 Op1->hasNoSignedWrap(); in factorizeMathWithShlOps()
1523 I.hasNoSignedWrap(), I.hasNoUnsignedWrap(), in visitAdd()
1559 if (Instruction *R = foldAddLikeCommutative(LHS, RHS, I.hasNoSignedWrap(), in visitAdd()
1562 if (Instruction *R = foldAddLikeCommutative(RHS, LHS, I.hasNoSignedWrap(), in visitAdd()
1572 Shl->setHasNoSignedWrap(I.hasNoSignedWrap()); in visitAdd()
1586 Sub->setHasNoSignedWrap(I.hasNoSignedWrap() && OB0->hasNoSignedWrap()); in visitAdd()
[all …]
H A DInstCombineShifts.cpp156 NewShift->setHasNoSignedWrap(Sh0->hasNoSignedWrap() && in reassociateShiftAmtsOfTwoSameDirectionShifts()
157 Sh1->hasNoSignedWrap()); in reassociateShiftAmtsOfTwoSameDirectionShifts()
448 NewShiftOp->setHasNoSignedWrap(I.hasNoSignedWrap()); in commonShiftTransforms()
474 return (I.hasNoSignedWrap() || I.hasNoUnsignedWrap()) && in commonShiftTransforms()
797 R->setHasNoSignedWrap(I.hasNoSignedWrap() && BO0->hasNoSignedWrap()); in FoldShiftByConstant()
986 if (I.hasNoUnsignedWrap() && I.hasNoSignedWrap()) in setShiftFlags()
1022 if (!I.hasNoSignedWrap()) { in setShiftFlags()
1045 I.hasNoSignedWrap(), I.hasNoUnsignedWrap(), Q)) in visitShl()
1093 I.hasNoSignedWrap())); in visitShl()
1094 NewShl->setHasNoSignedWrap(I.hasNoSignedWrap()); in visitShl()
[all …]
H A DInstCombineNegator.cpp237 IsNSW && I->hasNoSignedWrap()); in visitImpl()
404 IsNSW &= I->hasNoSignedWrap(); in visitImpl()
486 /*HasNUW=*/false, IsNSW && I->hasNoSignedWrap()); in visitImpl()
H A DInstCombineSimplifyDemanded.cpp569 bool NSW = cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap(); in SimplifyDemandedUseBits()
612 bool NSW = cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap(); in SimplifyDemandedUseBits()
675 if (I->hasNoSignedWrap()) { in SimplifyDemandedUseBits()
705 if (IOp->hasNoSignedWrap()) in SimplifyDemandedUseBits()
716 /* NSW */ IOp->hasNoSignedWrap()); in SimplifyDemandedUseBits()
1240 bool NSW = cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap(); in SimplifyMultipleUseDemandedBits()
1256 bool NSW = cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap(); in SimplifyMultipleUseDemandedBits()
1368 New->setHasNoSignedWrap(Orig->hasNoSignedWrap()); in simplifyShrShlDemandedBits()
H A DInstCombineCompares.cpp1280 if (BO0->hasNoUnsignedWrap() || BO0->hasNoSignedWrap()) { in foldICmpWithZero()
1458 if (Trunc->hasNoSignedWrap()) in foldICmpTruncConstant()
2195 (Mul->hasNoUnsignedWrap() || Mul->hasNoSignedWrap())) in foldICmpMulConstant()
2206 if (isSignTest(Pred, C) && Mul->hasNoSignedWrap()) { in foldICmpMulConstant()
2219 if (Mul->hasNoSignedWrap() && C.srem(*MulC).isZero()) { in foldICmpMulConstant()
2243 if (Mul->hasNoSignedWrap() && ICmpInst::isSigned(Pred)) { in foldICmpMulConstant()
2338 if (C.sle(0) && Shl->hasNoUnsignedWrap() && Shl->hasNoSignedWrap()) in foldICmpShlConstant()
2344 (Shl->hasNoUnsignedWrap() || Shl->hasNoSignedWrap())) in foldICmpShlConstant()
2353 if (Shl->hasNoSignedWrap() && in foldICmpShlConstant()
2374 if (Shl->hasNoSignedWrap()) { in foldICmpShlConstant()
[all …]
H A DInstructionCombining.cpp309 if (!OBO || !OBO->hasNoSignedWrap()) in maintainNoSignedWrap()
340 static bool hasNoSignedWrap(BinaryOperator &I) { in hasNoSignedWrap() function
342 return OBO && OBO->hasNoSignedWrap(); in hasNoSignedWrap()
485 bool IsNSW = maintainNoSignedWrap(I, B, C) && hasNoSignedWrap(*Op0); in SimplifyAssociativeOrCommutative()
760 HasNSW = I.hasNoSignedWrap(); in tryFactorization()
764 HasNSW &= LOBO->hasNoSignedWrap(); in tryFactorization()
769 HasNSW &= ROBO->hasNoSignedWrap(); in tryFactorization()
4169 if (Shl->hasNoUnsignedWrap() || Shl->hasNoSignedWrap() || in visitSwitchInst()
4172 if (!Shl->hasNoUnsignedWrap() && !Shl->hasNoSignedWrap()) { in visitSwitchInst()
4180 APInt ShiftedCase = Shl->hasNoSignedWrap() ? CaseVal.ashr(ShiftAmt) in visitSwitchInst()
/freebsd/contrib/llvm-project/llvm/include/llvm/SandboxIR/
H A DOperator.h40 bool hasNoSignedWrap() const { in hasNoSignedWrap() function
41 return cast<llvm::OverflowingBinaryOperator>(Val)->hasNoSignedWrap(); in hasNoSignedWrap()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DSimplifyQuery.h43 template <class InstT> bool hasNoSignedWrap(const InstT *Op) const { in hasNoSignedWrap() function
45 return Op->hasNoSignedWrap(); in hasNoSignedWrap()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DInstruction.cpp409 bool Instruction::hasNoSignedWrap() const { in hasNoSignedWrap() function in Instruction
411 return Inst->hasNoSignedWrap(); in hasNoSignedWrap()
413 return cast<TruncInst>(this)->hasNoSignedWrap(); in hasNoSignedWrap()
677 setHasNoSignedWrap(OB->hasNoSignedWrap()); in copyIRFlags()
684 setHasNoSignedWrap(TI->hasNoSignedWrap()); in copyIRFlags()
720 setHasNoSignedWrap(hasNoSignedWrap() && OB->hasNoSignedWrap()); in andIRFlags()
727 setHasNoSignedWrap(hasNoSignedWrap() && TI->hasNoSignedWrap()); in andIRFlags()
H A DOperator.cpp28 return OBO->hasNoUnsignedWrap() || OBO->hasNoSignedWrap(); in hasPoisonGeneratingFlags()
32 return TI->hasNoUnsignedWrap() || TI->hasNoSignedWrap(); in hasPoisonGeneratingFlags()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SandboxVectorizer/
H A DLegality.cpp68 bool NSW0 = I0->hasNoSignedWrap(); in notVectorizableBasedOnOpcodesAndTypes()
71 cast<Instruction>(V)->hasNoSignedWrap() != NSW0; in notVectorizableBasedOnOpcodesAndTypes()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DHashRecognize.cpp140 OBO->hasNoSignedWrap()); in computeBinOp()
149 OBO->hasNoSignedWrap()); in computeBinOp()
154 OBO->hasNoSignedWrap()); in computeBinOp()
H A DPHITransAddr.cpp249 bool isNSW = cast<BinaryOperator>(Inst)->hasNoSignedWrap(); in translateSubExpr()
419 Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap()); in insertTranslatedSubExpr()
H A DValueTracking.cpp1233 bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I)); in computeKnownBitsFromOperator()
1403 bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I)); in computeKnownBitsFromOperator()
1441 bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I)); in computeKnownBitsFromOperator()
1448 bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I)); in computeKnownBitsFromOperator()
1648 if (!OverflowOp || !Q.IIQ.hasNoSignedWrap(OverflowOp)) in computeKnownBitsFromOperator()
2362 Q.IIQ.hasNoSignedWrap(BO)) && in isPowerOfTwoRecurrence()
2377 return OrZero || Q.IIQ.hasNoUnsignedWrap(BO) || Q.IIQ.hasNoSignedWrap(BO); in isPowerOfTwoRecurrence()
2485 if (OrZero || Q.IIQ.hasNoUnsignedWrap(I) || Q.IIQ.hasNoSignedWrap(I)) in isKnownToBeAPowerOfTwo()
2516 Q.IIQ.hasNoSignedWrap(VOBO)) { in isKnownToBeAPowerOfTwo()
2807 (BO->hasNoSignedWrap() && match(Step, m_APInt(StepC)) && in isNonZeroRecurrence()
[all …]
H A DInstructionSimplify.cpp1106 if ((IsSigned && Q.IIQ.hasNoSignedWrap(Mul)) || in simplifyDivRem()
1671 bool IsNSW = IIQ.hasNoSignedWrap(AddInst); in simplifyAndOfICmpsWithAdd()
1762 bool IsNSW = IIQ.hasNoSignedWrap(AddInst); in simplifyOrOfICmpsWithAdd()
3270 Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(LBO))); in simplifyICmpWithBinOp()
3280 Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(RBO))); in simplifyICmpWithBinOp()
3368 if (Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(LBO)) || in simplifyICmpWithBinOp()
3397 bool NSW = Q.IIQ.hasNoSignedWrap(LBO) && Q.IIQ.hasNoSignedWrap(RBO); in simplifyICmpWithBinOp()
3469 bool NSW = Q.IIQ.hasNoSignedWrap(LBO) && Q.IIQ.hasNoSignedWrap(RBO); in simplifyICmpWithBinOp()
7126 NewOps[0], NewOps[1], Q.IIQ.hasNoSignedWrap(cast<BinaryOperator>(I)), in simplifyInstructionWithOperands()
7133 NewOps[0], NewOps[1], Q.IIQ.hasNoSignedWrap(cast<BinaryOperator>(I)), in simplifyInstructionWithOperands()
[all …]
H A DDemandedBits.cpp182 if (S->hasNoSignedWrap()) in determineLiveOperandBits()
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DOperator.h111 bool hasNoSignedWrap() const { in hasNoSignedWrap() function
121 if (hasNoSignedWrap()) in getNoWrapKind()
H A DInstruction.h539 LLVM_ABI bool hasNoSignedWrap() const LLVM_READONLY;
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp56 NSW = OBO->hasNoSignedWrap(); in PoisonFlags()
66 NSW = TI->hasNoSignedWrap(); in PoisonFlags()
283 if (I->hasNoSignedWrap() != (Flags & SCEV::FlagNSW)) in InsertBinop()
1178 if (!S->hasNoSignedWrap()) in expandAddRecExprLiterally()
1657 OBOIncV->hasNoSignedWrap() && OBOIsomorphic->hasNoSignedWrap(); in replaceCongruentIVInc()
1673 OrigInc->setHasNoSignedWrap(OBOIncV->hasNoSignedWrap() || BothHaveNSW); in replaceCongruentIVInc()
H A DSimplifyIndVar.cpp1416 IsNSW = OBO->hasNoSignedWrap();
1455 bool IsNSW = Op->hasNoSignedWrap() && in matchBinaryOp()
1686 bool CanSignExtend = ExtKind == ExtendKind::Sign && OBO->hasNoSignedWrap(); in widenWithVariantUse()
1952 DU.NarrowUse->hasNoSignedWrap() != WideInc->hasNoSignedWrap(); in widenIVUse()
2131 WideInc->setHasNoSignedWrap(WideInc->hasNoSignedWrap() || in createWideIV()
2132 OrigInc->hasNoSignedWrap()); in createWideIV()
H A DLoopUnroll.cpp403 Inst.setHasNoSignedWrap(Inst.hasNoSignedWrap() && in simplifyLoopAfterUnroll()
404 InnerOBO->hasNoSignedWrap() && in simplifyLoopAfterUnroll()
H A DSCCPSolver.cpp113 if (Inst.hasNoSignedWrap() && Inst.hasNoUnsignedWrap()) in refineInstruction()
127 if (!Inst.hasNoSignedWrap()) { in refineInstruction()
143 if (TI->hasNoSignedWrap() && TI->hasNoUnsignedWrap()) in refineInstruction()
154 if (!TI->hasNoSignedWrap()) { in refineInstruction()
H A DFunctionComparator.cpp473 cmpNumbers(OBOL->hasNoSignedWrap(), OBOR->hasNoSignedWrap())) in cmpConstants()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DCorrelatedValuePropagation.cpp1173 bool NSW = BinOp->hasNoSignedWrap(); in processBinOp()
1228 if (TI->hasNoSignedWrap() && TI->hasNoUnsignedWrap()) in processTrunc()
1244 if (!TI->hasNoSignedWrap()) { in processTrunc()

123