Home
last modified time | relevance | path

Searched refs:Overflow (Results 1 – 25 of 83) sorted by relevance

1234

/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DAPFixedPoint.cpp33 bool *Overflow) const { in convert()
36 if (Overflow) in convert()
37 *Overflow = false; in convert()
54 else if (Overflow) in convert()
55 *Overflow = true; in convert()
64 else if (Overflow) in convert()
65 *Overflow = true; in convert()
188 bool *Overflow) const { in add()
205 if (Overflow) in add()
206 *Overflow = Overflowed; in add()
[all …]
H A DAPInt.cpp1898 APInt APInt::sadd_ov(const APInt &RHS, bool &Overflow) const { in sadd_ov()
1900 Overflow = isNonNegative() == RHS.isNonNegative() && in sadd_ov()
1905 APInt APInt::uadd_ov(const APInt &RHS, bool &Overflow) const { in uadd_ov()
1907 Overflow = Res.ult(RHS); in uadd_ov()
1911 APInt APInt::ssub_ov(const APInt &RHS, bool &Overflow) const { in ssub_ov()
1913 Overflow = isNonNegative() != RHS.isNonNegative() && in ssub_ov()
1918 APInt APInt::usub_ov(const APInt &RHS, bool &Overflow) const { in usub_ov()
1920 Overflow = Res.ugt(*this); in usub_ov()
1924 APInt APInt::sdiv_ov(const APInt &RHS, bool &Overflow) const { in sdiv_ov()
1926 Overflow = isMinSignedValue() && RHS.isAllOnes(); in sdiv_ov()
[all …]
H A DBlockFrequency.cpp44 bool Overflow; in mul() local
45 uint64_t ResultFrequency = SaturatingMultiply(Frequency, Factor, &Overflow); in mul()
46 if (Overflow) in mul()
H A DSlowDynamicAPInt.cpp161 function_ref<APInt(const APInt &, const APInt &, bool &Overflow)> Op) { in runOpWithExpandOnOverflow()
162 bool Overflow; in runOpWithExpandOnOverflow() local
164 APInt Ret = Op(A.sext(Width), B.sext(Width), Overflow); in runOpWithExpandOnOverflow()
165 if (!Overflow) in runOpWithExpandOnOverflow()
169 Ret = Op(A.sext(Width), B.sext(Width), Overflow); in runOpWithExpandOnOverflow()
170 assert(!Overflow && "double width should be sufficient to avoid overflow!"); in runOpWithExpandOnOverflow()
H A DKnownBits.cpp619 std::optional<bool> Overflow; in computeForSatAddSub() local
627 Overflow = (LHS.isNonNegative() == RHS.isNonNegative() && in computeForSatAddSub()
631 Overflow = (LHS.isNonNegative() != RHS.isNonNegative() && in computeForSatAddSub()
640 Overflow = false; in computeForSatAddSub()
644 Overflow = true; in computeForSatAddSub()
651 Overflow = false; in computeForSatAddSub()
655 Overflow = true; in computeForSatAddSub()
706 if (Overflow) { in computeForSatAddSub()
708 if (!(*Overflow)) { in computeForSatAddSub()
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPFixedPoint.h184 bool *Overflow = nullptr) const;
190 APFixedPoint add(const APFixedPoint &Other, bool *Overflow = nullptr) const;
191 APFixedPoint sub(const APFixedPoint &Other, bool *Overflow = nullptr) const;
192 APFixedPoint mul(const APFixedPoint &Other, bool *Overflow = nullptr) const;
193 APFixedPoint div(const APFixedPoint &Other, bool *Overflow = nullptr) const;
198 APFixedPoint shl(unsigned Amt, bool *Overflow = nullptr) const;
199 APFixedPoint shr(unsigned Amt, bool *Overflow = nullptr) const {
201 if (Overflow)
202 *Overflow = false;
208 APFixedPoint negate(bool *Overflow = nullptr) const;
[all …]
H A DDynamicAPInt.h294 bool Overflow = AddOverflow(getSmall(), O.getSmall(), Result.getSmall());
295 if (LLVM_LIKELY(!Overflow))
307 bool Overflow = SubOverflow(getSmall(), O.getSmall(), Result.getSmall());
308 if (LLVM_LIKELY(!Overflow))
320 bool Overflow = MulOverflow(getSmall(), O.getSmall(), Result.getSmall());
321 if (LLVM_LIKELY(!Overflow))
430 bool Overflow = AddOverflow(getSmall(), O.getSmall(), Result);
431 if (LLVM_LIKELY(!Overflow)) {
447 bool Overflow = SubOverflow(getSmall(), O.getSmall(), Result);
448 if (LLVM_LIKELY(!Overflow)) {
[all …]
H A DAPInt.h990 APInt sadd_ov(const APInt &RHS, bool &Overflow) const;
991 APInt uadd_ov(const APInt &RHS, bool &Overflow) const;
992 APInt ssub_ov(const APInt &RHS, bool &Overflow) const;
993 APInt usub_ov(const APInt &RHS, bool &Overflow) const;
994 APInt sdiv_ov(const APInt &RHS, bool &Overflow) const;
995 APInt smul_ov(const APInt &RHS, bool &Overflow) const;
996 APInt umul_ov(const APInt &RHS, bool &Overflow) const;
997 APInt sshl_ov(const APInt &Amt, bool &Overflow) const;
998 APInt sshl_ov(unsigned Amt, bool &Overflow) const;
999 APInt ushl_ov(const APInt &Amt, bool &Overflow) const;
[all …]
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DOperator.cpp144 bool Overflow = false; in accumulateConstantOffset() local
145 APInt OffsetPlus = Index.smul_ov(IndexedSize, Overflow); in accumulateConstantOffset()
146 if (Overflow) in accumulateConstantOffset()
148 Offset = Offset.sadd_ov(OffsetPlus, Overflow); in accumulateConstantOffset()
149 if (Overflow) in accumulateConstantOffset()
H A DValue.cpp758 bool Overflow = false; in stripAndAccumulateConstantOffsets() local
760 Offset = Offset.sadd_ov(GEPOffsetST, Overflow); in stripAndAccumulateConstantOffsets()
761 if (Overflow) { in stripAndAccumulateConstantOffsets()
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DCheckedArithmetic.h32 bool Overflow; variable
33 llvm::APInt Out = (ALHS.*Op)(ARHS, Overflow);
34 if (Overflow)
/freebsd/contrib/llvm-project/clang/lib/Lex/
H A DPPExpressions.cpp490 bool Overflow = !Result.isUnsigned() && Result.Val.isMinSignedValue(); in EvaluateValue() local
493 if (Overflow && ValueLive) in EvaluateValue()
703 bool Overflow = false; in EvaluateDirectiveSubExpr() local
718 Res = llvm::APSInt(LHS.Val.sdiv_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
730 Res = llvm::APSInt(LHS.Val.smul_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
737 Res = LHS.Val.ushl_ov(RHS.Val, Overflow); in EvaluateDirectiveSubExpr()
739 Res = llvm::APSInt(LHS.Val.sshl_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
746 Overflow = true; in EvaluateDirectiveSubExpr()
756 Res = llvm::APSInt(LHS.Val.sadd_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
762 Res = llvm::APSInt(LHS.Val.ssub_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
[all …]
H A DLiteralSupport.cpp205 bool Overflow = false; in ProcessCharEscape() local
226 Overflow = true; in ProcessCharEscape()
232 Overflow = true; in ProcessCharEscape()
237 if (!HadError && Overflow) { // Too many digits to fit in in ProcessCharEscape()
272 bool Overflow = false; in ProcessCharEscape() local
308 Overflow = true; in ProcessCharEscape()
315 (Overflow || (CharWidth != 32 && (ResultChar >> CharWidth) != 0))) { in ProcessCharEscape()
482 bool Overflow = false; in ProcessNumericUCNEscape() local
505 Overflow = true; in ProcessNumericUCNEscape()
513 if (Overflow) { in ProcessNumericUCNEscape()
/freebsd/contrib/tcsh/nls/italian/
H A Dset147 45 Overflow di linea
97 95 Overflow di buffer nella sostituzione
127 125 Overflow di selettore
/freebsd/contrib/llvm-project/llvm/lib/FileCheck/
H A DFileCheck.cpp157 const APInt &RightOperand, bool &Overflow) { in exprAdd() argument
158 return LeftOperand.sadd_ov(RightOperand, Overflow); in exprAdd()
162 const APInt &RightOperand, bool &Overflow) { in exprSub() argument
163 return LeftOperand.ssub_ov(RightOperand, Overflow); in exprSub()
167 const APInt &RightOperand, bool &Overflow) { in exprMul() argument
168 return LeftOperand.smul_ov(RightOperand, Overflow); in exprMul()
172 const APInt &RightOperand, bool &Overflow) { in exprDiv() argument
177 return LeftOperand.sdiv_ov(RightOperand, Overflow); in exprDiv()
181 const APInt &RightOperand, bool &Overflow) { in exprMax() argument
182 Overflow = false; in exprMax()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DInterpBuiltin.cpp678 bool Overflow; in interp__builtin_overflowop() local
716 Result = LHS.isSigned() ? LHS.sadd_ov(RHS, Overflow) in interp__builtin_overflowop()
717 : LHS.uadd_ov(RHS, Overflow); in interp__builtin_overflowop()
726 Result = LHS.isSigned() ? LHS.ssub_ov(RHS, Overflow) in interp__builtin_overflowop()
727 : LHS.usub_ov(RHS, Overflow); in interp__builtin_overflowop()
736 Result = LHS.isSigned() ? LHS.smul_ov(RHS, Overflow) in interp__builtin_overflowop()
737 : LHS.umul_ov(RHS, Overflow); in interp__builtin_overflowop()
754 Overflow = true; in interp__builtin_overflowop()
762 S.Stk.push<Boolean>(Overflow); in interp__builtin_overflowop()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DMemoryBuiltins.cpp433 bool Overflow; in getAllocSize() local
434 Size = Size.umul_ov(NumElems, Overflow); in getAllocSize()
435 if (Overflow) in getAllocSize()
794 bool Overflow; in visitAllocaInst() local
795 Size = Size.umul_ov(NumElems, Overflow); in visitAllocaInst()
796 return Overflow ? ObjectSizeOffsetVisitor::unknown() in visitAllocaInst()
H A DLoads.cpp329 bool Overflow = false; in isDereferenceableAndAlignedInLoop() local
330 AccessSize = AccessSize.uadd_ov(Offset->getAPInt(), Overflow); in isDereferenceableAndAlignedInLoop()
331 if (Overflow) in isDereferenceableAndAlignedInLoop()
H A DConstantFolding.cpp900 bool Overflow = false; in SymbolicallyEvaluateGEP() local
928 Overflow); in SymbolicallyEvaluateGEP()
933 if (NW.hasNoUnsignedSignedWrap() && !NW.isInBounds() && Overflow) in SymbolicallyEvaluateGEP()
2852 bool Overflow; in ConstantFoldIntrinsicCall2() local
2856 Res = C0->sadd_ov(*C1, Overflow); in ConstantFoldIntrinsicCall2()
2859 Res = C0->uadd_ov(*C1, Overflow); in ConstantFoldIntrinsicCall2()
2862 Res = C0->ssub_ov(*C1, Overflow); in ConstantFoldIntrinsicCall2()
2865 Res = C0->usub_ov(*C1, Overflow); in ConstantFoldIntrinsicCall2()
2868 Res = C0->smul_ov(*C1, Overflow); in ConstantFoldIntrinsicCall2()
2871 Res = C0->umul_ov(*C1, Overflow); in ConstantFoldIntrinsicCall2()
[all …]
H A DStackSafetyAnalysis.cpp169 bool Overflow = false; in getStaticAllocaSizeRange() local
174 APSize = APSize.smul_ov(Mul, Overflow); in getStaticAllocaSizeRange()
175 if (Overflow) in getStaticAllocaSizeRange()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DLegalizeVectorOps.cpp1776 SDValue Result, Overflow; in ExpandUADDSUBO() local
1777 TLI.expandUADDSUBO(Node, Result, Overflow, DAG); in ExpandUADDSUBO()
1779 Results.push_back(Overflow); in ExpandUADDSUBO()
1784 SDValue Result, Overflow; in ExpandSADDSUBO() local
1785 TLI.expandSADDSUBO(Node, Result, Overflow, DAG); in ExpandSADDSUBO()
1787 Results.push_back(Overflow); in ExpandSADDSUBO()
1792 SDValue Result, Overflow; in ExpandMULO() local
1793 if (!TLI.expandMULO(Node, Result, Overflow, DAG)) in ExpandMULO()
1794 std::tie(Result, Overflow) = DAG.UnrollVectorOverflowOp(Node); in ExpandMULO()
1797 Results.push_back(Overflow); in ExpandMULO()
/freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/
H A DSPIRVPrepareFunctions.cpp359 Value *Overflow = IRB.CreateICmpNE(UMulFunc->getArg(0), Div); in buildUMulWithOverflowFunc() local
365 Value *Res = IRB.CreateInsertValue(Agg, Overflow, {1}); in buildUMulWithOverflowFunc()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineCalls.cpp815 Constant *Overflow) { in createOverflowTuple() argument
816 Constant *V[] = {PoisonValue::get(Result->getType()), Overflow}; in createOverflowTuple()
1108 bool Overflow; in moveAddAfterMinMax() local
1110 IsSigned ? C1->ssub_ov(*C0, Overflow) : C1->usub_ov(*C0, Overflow); in moveAddAfterMinMax()
1111 assert(!Overflow && "Expected simplify of min/max"); in moveAddAfterMinMax()
2175 bool Overflow; in visitCallInst() local
2177 IsSigned ? C1->sadd_ov(*C0, Overflow) : C1->uadd_ov(*C0, Overflow); in visitCallInst()
2178 if (!Overflow) in visitCallInst()
2288 bool Overflow; in visitCallInst() local
2289 NewVal = Val->sadd_ov(*Val2, Overflow); in visitCallInst()
[all …]
H A DInstCombineMulDivRem.cpp1054 bool Overflow; in multiplyOverflows() local
1055 Product = IsSigned ? C1.smul_ov(C2, Overflow) : C1.umul_ov(C2, Overflow); in multiplyOverflows()
1056 return Overflow; in multiplyOverflows()
1531 bool Overflow; in visitUDiv() local
1532 APInt C2ShlC1 = C2->ushl_ov(*C1, Overflow); in visitUDiv()
1533 if (!Overflow) { in visitUDiv()
/freebsd/contrib/llvm-project/llvm/lib/Target/M68k/
H A DM68kInstrControl.td61 /// MI—Minus VC—Overflow clear
63 /// NE—Not equal VS—Overflow set

1234