Home
last modified time | relevance | path

Searched refs:OverflowResult (Results 1 – 12 of 12) sorted by relevance

/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DConstantRange.h530 enum class OverflowResult { enum
542 OverflowResult unsignedAddMayOverflow(const ConstantRange &Other) const;
545 OverflowResult signedAddMayOverflow(const ConstantRange &Other) const;
548 OverflowResult unsignedSubMayOverflow(const ConstantRange &Other) const;
551 OverflowResult signedSubMayOverflow(const ConstantRange &Other) const;
554 OverflowResult unsignedMulMayOverflow(const ConstantRange &Other) const;
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstantRange.cpp1676 return OverflowResult::MayOverflow; in unsignedAddMayOverflow()
1685 return OverflowResult::MayOverflow; in unsignedAddMayOverflow()
1692 return OverflowResult::MayOverflow; in signedAddMayOverflow()
1711 return OverflowResult::MayOverflow; in signedAddMayOverflow()
1714 return OverflowResult::MayOverflow; in signedAddMayOverflow()
1722 return OverflowResult::MayOverflow; in unsignedSubMayOverflow()
1731 return OverflowResult::MayOverflow; in unsignedSubMayOverflow()
1738 return OverflowResult::MayOverflow; in signedSubMayOverflow()
1757 return OverflowResult::MayOverflow; in signedSubMayOverflow()
1760 return OverflowResult::MayOverflow; in signedSubMayOverflow()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineInternal.h228 Constant *&OverflowResult);
257 OverflowResult::NeverOverflows; in willNotOverflowSignedAdd()
263 OverflowResult::NeverOverflows; in willNotOverflowUnsignedAdd()
275 OverflowResult::NeverOverflows; in willNotOverflowSignedSub()
281 OverflowResult::NeverOverflows; in willNotOverflowUnsignedSub()
293 OverflowResult::NeverOverflows; in willNotOverflowSignedMul()
299 OverflowResult::NeverOverflows; in willNotOverflowUnsignedMul()
496 OverflowResult computeOverflowForUnsignedMul(const Value *LHS, in computeOverflowForUnsignedMul()
502 OverflowResult computeOverflowForSignedMul(const Value *LHS, in computeOverflowForSignedMul()
514 OverflowResult computeOverflowForSignedAdd(const Value *LHS, in computeOverflowForSignedAdd()
[all …]
H A DInstCombineCalls.cpp808 Constant *OverflowResult = nullptr; in foldIntrinsicWithOverflowCommon() local
810 WO->getRHS(), *WO, OperationResult, OverflowResult)) in foldIntrinsicWithOverflowCommon()
811 return createOverflowTuple(WO, OperationResult, OverflowResult); in foldIntrinsicWithOverflowCommon()
1670 OverflowResult OR = computeOverflow(SI->getBinaryOp(), SI->isSigned(), in visitCallInst()
1673 case OverflowResult::MayOverflow: in visitCallInst()
1675 case OverflowResult::NeverOverflows: in visitCallInst()
1680 case OverflowResult::AlwaysOverflowsLow: { in visitCallInst()
1685 case OverflowResult::AlwaysOverflowsHigh: { in visitCallInst()
H A DInstCombineCompares.cpp5006 OverflowResult
5056 case OverflowResult::MayOverflow: in OptimizeOverflowCheck()
5058 case OverflowResult::AlwaysOverflowsLow: in OptimizeOverflowCheck()
5059 case OverflowResult::AlwaysOverflowsHigh: in OptimizeOverflowCheck()
5064 case OverflowResult::NeverOverflows: in OptimizeOverflowCheck()
/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DValueTracking.h508 enum class OverflowResult { enum
519 OverflowResult computeOverflowForUnsignedMul(const Value *LHS,
526 OverflowResult computeOverflowForSignedMul(const Value *LHS, const Value *RHS,
532 OverflowResult computeOverflowForUnsignedAdd(const Value *LHS,
539 OverflowResult computeOverflowForSignedAdd(const Value *LHS, const Value *RHS,
545 OverflowResult computeOverflowForSignedAdd(const AddOperator *Add,
550 OverflowResult computeOverflowForUnsignedSub(const Value *LHS, const Value *RHS,
555 OverflowResult computeOverflowForSignedSub(const Value *LHS, const Value *RHS,
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DLoopFlatten.cpp607 static OverflowResult checkOverflow(FlattenInfo &FI, DominatorTree *DT, in checkOverflow()
614 return OverflowResult::NeverOverflows; in checkOverflow()
618 OverflowResult OR = computeOverflowForUnsignedMul( in checkOverflow()
621 if (OR != OverflowResult::MayOverflow) in checkOverflow()
646 return OverflowResult::NeverOverflows; in checkOverflow()
653 return OverflowResult::MayOverflow; in checkOverflow()
880 OverflowResult OR = checkOverflow(FI, DT, AC); in FlattenLoopPair()
881 if (OR == OverflowResult::AlwaysOverflowsHigh || in FlattenLoopPair()
882 OR == OverflowResult::AlwaysOverflowsLow) { in FlattenLoopPair()
885 } else if (OR == OverflowResult::MayOverflow) { in FlattenLoopPair()
H A DNaryReassociate.cpp377 OverflowResult::NeverOverflows) in tryReassociateGEPAtIndex()
/llvm-project-15.0.7/llvm/include/llvm/Transforms/InstCombine/
H A DInstCombiner.h488 OverflowResult computeOverflowForUnsignedMul(const Value *LHS, in computeOverflowForUnsignedMul()
494 OverflowResult computeOverflowForSignedMul(const Value *LHS, const Value *RHS, in computeOverflowForSignedMul()
499 OverflowResult computeOverflowForUnsignedAdd(const Value *LHS, in computeOverflowForUnsignedAdd()
505 OverflowResult computeOverflowForSignedAdd(const Value *LHS, const Value *RHS, in computeOverflowForSignedAdd()
510 OverflowResult computeOverflowForUnsignedSub(const Value *LHS, in computeOverflowForUnsignedSub()
516 OverflowResult computeOverflowForSignedSub(const Value *LHS, const Value *RHS, in computeOverflowForSignedSub()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DValueTracking.cpp4816 static OverflowResult mapOverflowResult(ConstantRange::OverflowResult OR) { in mapOverflowResult()
4819 return OverflowResult::MayOverflow; in mapOverflowResult()
4857 OverflowResult
4878 return OverflowResult::NeverOverflows; in computeOverflowForSignedMul()
4897 return OverflowResult::MayOverflow; in computeOverflowForSignedMul()
4921 return OverflowResult::NeverOverflows; in computeOverflowForSignedAdd()
4940 return OverflowResult::NeverOverflows; in computeOverflowForSignedAdd()
4946 OverflowResult OR = in computeOverflowForSignedAdd()
4948 if (OR != OverflowResult::MayOverflow) in computeOverflowForSignedAdd()
4953 return OverflowResult::MayOverflow; in computeOverflowForSignedAdd()
[all …]
H A DStackSafetyAnalysis.cpp82 ConstantRange::OverflowResult::NeverOverflows) in addOverflowNever()
/llvm-project-15.0.7/llvm/unittests/IR/
H A DConstantRangeTest.cpp1917 EXPECT_EQ(ConstantRange::OverflowResult::MayOverflow, (op))
1919 EXPECT_EQ(ConstantRange::OverflowResult::AlwaysOverflowsLow, (op))
1921 EXPECT_EQ(ConstantRange::OverflowResult::AlwaysOverflowsHigh, (op))
1923 EXPECT_EQ(ConstantRange::OverflowResult::NeverOverflows, (op))
2114 ConstantRange::OverflowResult OR = MayOverflowFn(CR1, CR2); in TestOverflowExhaustive()
2116 case ConstantRange::OverflowResult::AlwaysOverflowsLow: in TestOverflowExhaustive()
2121 case ConstantRange::OverflowResult::AlwaysOverflowsHigh: in TestOverflowExhaustive()
2126 case ConstantRange::OverflowResult::NeverOverflows: in TestOverflowExhaustive()
2131 case ConstantRange::OverflowResult::MayOverflow: in TestOverflowExhaustive()