Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:Check

58 /// the returned overflow check is precise. The returned value is 'true' for
99 /// Check if the binop can result in integer overflow.
112 /// Check if the binop computes a division or a remainder.
118 /// Check if the binop can result in an integer division by zero.
126 /// Check if the binop can result in a float division by zero.
134 /// Check if at least one operand is a fixed point type. In such cases, this
138 // We cannot simply check the result type since comparison operations return
173 /// Check if \p E is a widened promoted integer.
178 /// Check if we can skip the overflow check for \p Op.
184 // we can elide the overflow check.
207 // widened operands. No overflow check is needed here.
212 // For unsigned multiplication the overflow check can be elided if either one
305 /// Emit a check that a conversion from a floating-point type does not
311 /// Known implicit conversion check kinds.
321 /// Emit a check that an [implicit] truncation of an integer does not
326 /// Emit a check that an [implicit] conversion of an integer does not change
531 // target, we can fold the check away.
728 // We need to check the types of the operands of the operator to get the
761 // Check for undefined division and modulus behaviors.
905 llvm::Value *Check = nullptr;
919 // Don't need an overflow check for lower bound. Just check for
931 // Don't need an overflow check for upper bound. Just check for
953 Check = Builder.CreateAnd(GE, LE);
958 CGF.EmitCheck(std::make_pair(Check, SanitizerKind::FloatCastOverflow),
993 llvm::Value *Check = nullptr;
995 Check = Builder.CreateIntCast(Dst, SrcTy, DstSigned, "anyext");
997 Check = Builder.CreateICmpEQ(Check, Src, "truncheck");
999 return std::make_pair(Kind, std::make_pair(Check, Mask));
1040 Check =
1045 if (!CGF.SanOpts.has(Check.second.second))
1051 llvm::ConstantInt::get(Builder.getInt8Ty(), Check.first)};
1052 CGF.EmitCheck(Check.second, SanitizerHandler::ImplicitConversion, StaticArgs,
1108 llvm::Value *Check = nullptr;
1109 Check = Builder.CreateICmpEQ(SrcIsNegative, DstIsNegative, "signchangecheck");
1113 std::make_pair(Check, SanitizerKind::ImplicitIntegerSignChange));
1136 // Now, we do not need to emit the check in *all* of the cases.
1139 // If it's a cast between effectively the same type, no check.
1147 // If the conversion is to *larger* *signed* type, then no check is needed.
1155 // and this is a truncation from signed type, then no check is needed.
1156 // Because here sign change check is interchangeable with truncation check.
1165 Check;
1173 Check = EmitIntegerSignChangeCheckHelper(Src, SrcType, Dst, DstType, Builder);
1174 CheckKind = Check.first;
1175 Checks.emplace_back(Check.second);
1181 // let's handle the case we skipped in that check.
1182 Check =
1185 Checks.emplace_back(Check.second);
1261 // It is important that we check this before checking if the dest type is
1263 // We do not need to check the padding bit on unsigned types if unsigned
1336 // other pointers and integers. Check for pointer types in terms of LLVM, as
1522 /// Emit a sanitization check for the given "binary" operation (which
1524 /// operation). The check passes if all values in \p Checks (which are \c i1),
1529 SanitizerHandler Check;
1540 Check = SanitizerHandler::NegateOverflow;
1546 Check = SanitizerHandler::ShiftOutOfBounds;
1554 Check = SanitizerHandler::DivremOverflow;
1559 case BO_Add: Check = SanitizerHandler::AddOverflow; break;
1560 case BO_Sub: Check = SanitizerHandler::SubOverflow; break;
1561 case BO_Mul: Check = SanitizerHandler::MulOverflow; break;
1562 default: llvm_unreachable("unexpected opcode for bin op check");
1570 CGF.EmitCheck(Checks, Check, StaticData, DynamicData);
1628 // Check for -1 and output it as undef in the IR.
2192 // check, which it is for data member pointers (but not member
2426 /// Handles check and update for lastprivate conditional variables.
2506 // Special case of integer increment that we have to check first: bool++.
2535 "The following check expects that if we do promotion to different "
2554 // Do pass non-default ScalarConversionOpts so that sanitizer check is
3091 // potentially with Implicit Conversion sanitizer check.
3197 // We need to check the types of the operands of the operator to get the
3306 // runtime. Otherwise, this is a -ftrapv check, so just emit a trap.
3518 // Check whether it would be legal to emit an fmuladd intrinsic call to
3522 // Does NOT check the type of the operation - it's assumed that this function
3532 // Check whether this op is marked as fusable.
3843 // TODO: This misses out on the sanitizer check below.
3878 // Check whether we are shifting any non-zero bits off the top of the
3879 // integer. We only emit this check if exponent is valid - otherwise
3883 llvm::BasicBlock *CheckShiftBase = CGF.createBasicBlock("check");
3892 "shl.check");
3921 // TODO: This misses out on the sanitizer check below.
5016 // Perform nullptr-and-offset check unless the nullptr is defined.
5019 // Check for overflows unless the GEP got constant-folded,
5043 // where nullptr+0 is defined, don't emit a check.