| /src/external/apache2/llvm/dist/clang/lib/Lex/ |
| LiteralSupport.cpp | 155 bool Overflow = false; 161 Overflow = true; 168 Overflow = true; 172 // Check for overflow. 173 if (Overflow && Diags) // Too many digits to fit in 194 // Check for overflow. Reject '\777', but not L'\777'. 1017 /// matches Val's input width. If there is an overflow, set Val to the low bits 1021 // bits per digit in this radix. If we can't possibly overflow a 1023 // integer. This avoids the expensive overflow checking below, and 1025 // hex/octal values which don't overflow) [all...] |
| PPExpressions.cpp | 334 // Overflow parsing integer literal. 344 // Detect overflow based on whether the value is signed. If signed 469 bool Overflow = !Result.isUnsigned() && Result.Val.isMinSignedValue(); 472 if (Overflow && ValueLive) 682 bool Overflow = false; 697 Res = llvm::APSInt(LHS.Val.sdiv_ov(RHS.Val, Overflow), false); 709 Res = llvm::APSInt(LHS.Val.smul_ov(RHS.Val, Overflow), false); 714 // Determine whether overflow is about to happen. 716 Res = LHS.Val.ushl_ov(RHS.Val, Overflow); 718 Res = llvm::APSInt(LHS.Val.sshl_ov(RHS.Val, Overflow), false) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Analysis/ |
| BasicAliasAnalysis.cpp | 545 // It can be the case that, even through C1*V+C2 does not overflow for 546 // relevant values of V, (C2*Scale) can overflow. In that case, we cannot 550 // (C1*Scale)*V+C2*Scale can also overflow. We should check for this 552 bool Overflow; 554 .smul_ov(Scale, Overflow); 555 if (Overflow) {
|
| ConstantFolding.cpp | 790 // (&GV+C1) - (&GV+C2) -> C1-C2, pointer arithmetic cannot overflow. 984 bool Overflow; 985 APInt NewIdx = Offset.sdiv_ov(ElemSize, Overflow); 986 if (Overflow) 2487 bool Overflow; 2491 Res = C0->sadd_ov(*C1, Overflow); 2494 Res = C0->uadd_ov(*C1, Overflow); 2497 Res = C0->ssub_ov(*C1, Overflow); 2500 Res = C0->usub_ov(*C1, Overflow); 2503 Res = C0->smul_ov(*C1, Overflow); [all...] |
| InstructionSimplify.cpp | 1055 // (X * Y) / Y -> X if the multiplication does not overflow. 1059 // If the Mul does not overflow, then we are good to go. 1063 // If X has the form X = A / Y, then X * Y cannot overflow. 1074 // (X /u C1) /u C2 -> 0 if C1 * C2 overflow 1078 bool Overflow; 1079 (void)C1->getValue().umul_ov(C2->getValue(), Overflow); 1080 if (Overflow) 1149 // If two operands are negated and no signed overflow, return -1. 2032 // If we have a multiplication overflow check that is being 'and'ed with a 2034 // only keep the overflow check [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/CodeGen/SelectionDAG/ |
| LegalizeVectorOps.cpp | 1396 SDValue Result, Overflow; 1397 TLI.expandUADDSUBO(Node, Result, Overflow, DAG); 1399 Results.push_back(Overflow); 1404 SDValue Result, Overflow; 1405 TLI.expandSADDSUBO(Node, Result, Overflow, DAG); 1407 Results.push_back(Overflow); 1412 SDValue Result, Overflow; 1413 if (!TLI.expandMULO(Node, Result, Overflow, DAG)) 1414 std::tie(Result, Overflow) = DAG.UnrollVectorOverflowOp(Node); 1417 Results.push_back(Overflow); [all...] |
| LegalizeIntegerTypes.cpp | 735 /// Promote the overflow flag of an overflowing arithmetic node. 803 // Shift cannot use a min/max expansion, we can't detect overflow if all of 1023 // Calculate the overflow flag: sign extend the arithmetic result from 1030 // Use the calculated overflow everywhere. 1297 // Calculate the overflow flag: zero extend the arithmetic result from 1303 // Use the calculated overflow everywhere. 1353 // Promote the overflow bit trivially. 1363 // then also check the high bits of the result to see if overflow happened 1375 // Overflow occurred if it occurred in the larger type, or if the high part 1378 SDValue Overflow; [all...] |
| DAGCombiner.cpp | 880 // We provide an Offset so that we can create bitwidths that won't overflow. 2567 // If it cannot overflow, transform into an add. 2736 // If it cannot overflow, transform into an add. 2810 // If it cannot overflow, transform into an add. 2839 // If Y + 1 cannot overflow. 4683 bool Overflow; 4685 IsSigned ? N0C->getAPIntValue().smul_ov(N1C->getAPIntValue(), Overflow) 4686 : N0C->getAPIntValue().umul_ov(N1C->getAPIntValue(), Overflow); 4688 DAG.getBoolConstant(Overflow, DL, CarryVT, CarryVT)); 4717 // result bit width (minus 1), there is no overflow [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/IR/ |
| Value.cpp | 707 // represents. We need to detect overflow/underflow. 712 bool Overflow = false; 714 Offset = Offset.sadd_ov(GEPOffsetST, Overflow); 715 if (Overflow) {
|
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/ |
| InstCombineMulDivRem.cpp | 692 bool Overflow; 693 Product = IsSigned ? C1.smul_ov(C2, Overflow) : C1.umul_ov(C2, Overflow); 694 return Overflow; 839 // X / (X * Y) -> 1 / Y if the multiplication does not overflow. 1018 bool Overflow; 1019 APInt C2ShlC1 = C2->ushl_ov(*C1, Overflow); 1020 if (!Overflow) { 1155 // -X / C --> X / -C (if the negation doesn't overflow).
|
| InstCombineSelect.cpp | 833 // The overflow may be detected via the add wrapping round. 2169 bool Overflow; 2170 APInt Diff = C2->ssub_ov(*C1, Overflow); 2171 if (!Overflow) {
|
| InstCombineCalls.cpp | 702 /// Creates a result tuple for an overflow intrinsic \p II with a given 703 /// \p Result and a constant \p Overflow value. 705 Constant *Overflow) { 706 Constant *V[] = {UndefValue::get(Result->getType()), Overflow}; 1150 // Given 2 constant operands whose sum does not overflow: 1161 bool Overflow; 1163 IsSigned ? C1->sadd_ov(*C0, Overflow) : C1->uadd_ov(*C0, Overflow); 1164 if (!Overflow) 1211 // Make use of known overflow information [all...] |
| InstCombineCompares.cpp | 42 bool Overflow; 44 Result = In1.sadd_ov(In2, Overflow); 46 Result = In1.uadd_ov(In2, Overflow); 48 return Overflow; 55 bool Overflow; 57 Result = In1.ssub_ov(In2, Overflow); 59 Result = In1.usub_ov(In2, Overflow); 61 return Overflow; 383 /// to generate the first by knowing that pointer arithmetic doesn't overflow. 734 // overflow [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/ |
| AMDGPURegisterBankInfo.cpp | 1703 unsigned Overflow = ImmOffset & ~MaxImm; 1704 ImmOffset -= Overflow; 1705 if ((int32_t)Overflow < 0) { 1706 Overflow += ImmOffset; 1711 if (Overflow != 0) { 1713 BaseReg = B.buildConstant(S32, Overflow).getReg(0); 1715 auto OverflowVal = B.buildConstant(S32, Overflow);
|
| SIISelLowering.cpp | 5147 SDValue Overflow = DAG.getSetCC(SL, MVT::i1, 5151 return DAG.getMergeValues({ Result, Overflow }, SL); 5163 SDValue Overflow = DAG.getSetCC(SL, MVT::i1, Top, Sign, ISD::SETNE); 5165 return DAG.getMergeValues({ Result, Overflow }, SL); 7835 unsigned Overflow = ImmOffset & ~MaxImm; 7836 ImmOffset -= Overflow; 7837 if ((int32_t)Overflow < 0) { 7838 Overflow += ImmOffset; 7842 if (Overflow) { 7843 auto OverflowVal = DAG.getConstant(Overflow, DL, MVT::i32) [all...] |
| /src/external/apache2/llvm/dist/clang/lib/CodeGen/ |
| CGExprScalar.cpp | 55 /// Determine whether the given binary operation may overflow. 58 /// the returned overflow check is precise. The returned value is 'true' for 63 // Assume overflow is possible, unless we can prove otherwise. 64 bool Overflow = true; 69 Result = LHSAP.sadd_ov(RHSAP, Overflow); 71 Result = LHSAP.uadd_ov(RHSAP, Overflow); 74 Result = LHSAP.ssub_ov(RHSAP, Overflow); 76 Result = LHSAP.usub_ov(RHSAP, Overflow); 79 Result = LHSAP.smul_ov(RHSAP, Overflow); 81 Result = LHSAP.umul_ov(RHSAP, Overflow); 3299 Value *overflow = Builder.CreateExtractValue(resultAndOverflow, 1); local [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/CodeGen/GlobalISel/ |
| LegalizerHelper.cpp | 1777 // There is no overflow if the ExtOp is the same as NewOp. 1846 // then also check the high bits of the result to see if overflow happened 1858 // Overflow occurred if it occurred in the larger type, or if the high part 1862 // For signed, overflow occurred when the high part does not sign-extend 1866 // Unsigned overflow occurred when the high part does not zero-extend the 1871 // Multiplication cannot overflow if the WideTy is >= 2 * original width, 1872 // so we don't need to check the overflow result of larger type Mulo. 1874 auto Overflow = 1877 MIRBuilder.buildOr(OriginalOverflow, Mulo->getOperand(1), Overflow); 2949 // Generate G_UMULH/G_SMULH to check for overflow and a normal G_MUL for th [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/RISCV/ |
| RISCVISelLowering.cpp | 4788 SDValue Overflow = DAG.getSetCC(DL, N->getValueType(1), Res, LHS, 4792 Results.push_back(Overflow); 4801 // sign extend allows overflow of the lower 32 bits to be detected on
|
| /src/external/apache2/llvm/dist/clang/lib/Sema/ |
| SemaExpr.cpp | 1410 // account rounding and overflow) to the precision of the resulting type. 3598 // Overflow is always an error, but underflow is only an error if 10871 // When left shifting an ICE which is signed, we can check for overflow which 10875 // warn for those. (FIXME: Unsigned left-shift overflow in a constant 12293 bool Overflow = false; 12295 llvm::APInt PowValue = One.sshl_ov(RightSideValue, Overflow); 12296 if (Overflow) {
|
| /src/external/apache2/llvm/dist/llvm/lib/Target/AArch64/ |
| AArch64ISelLowering.cpp | 500 // Add/Sub overflow ops with MVT::Glues are lowered to NZCV dependences. 546 // Custom lower Add/Sub/Mul with overflow. 2576 // Protect against exponential runtime and stack overflow. 2920 SDValue Value, Overflow; 2927 llvm_unreachable("Unknown overflow instruction!"); 2951 // For a 32 bit multiply with overflow check we want the instruction 2966 // The signed overflow check requires more than just a simple check for 2968 // just the sign bits of a negative number. To perform the overflow 2979 Overflow = DAG.getNode(AArch64ISD::SUBS, DL, VTs, UpperBits, LowerBits) 2982 // The overflow check for unsigned multiply is easy. We only need t [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/ARM/ |
| ARMISelLowering.cpp | 4605 // If the RHS is a constant zero then the V (overflow) flag will never be 4674 // computation *does not* overflow. 4692 llvm_unreachable("Unknown overflow instruction!"); 4761 SDValue Overflow = DAG.getNode(ARMISD::CMOV, dl, VT, TVal, FVal, 4765 return DAG.getNode(ISD::MERGE_VALUES, dl, VTs, Value, Overflow); 4805 SDValue Overflow; 4808 llvm_unreachable("Unknown overflow instruction!"); 4812 Overflow = ConvertCarryFlagToBooleanCarry(Value.getValue(1), VT, DAG); 4817 Overflow = ConvertCarryFlagToBooleanCarry(Value.getValue(1), VT, DAG); 4818 // ARMISD::SUBC returns 0 when we have to borrow, so make it an overflow [all...] |