Skip to content

Fix simple bugs #117151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bolt/lib/Rewrite/LinuxKernelRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ Error LinuxKernelRewriter::readORCTables() {
// As such, we can ignore alternative ORC entries. They will be preserved
// in the binary, but will not get printed in the instruction stream.
Inst = BF->getInstructionContainingOffset(Offset);
if (Inst || BC.MIB->hasAnnotation(*Inst, "AltInst"))
if (Inst && BC.MIB->hasAnnotation(*Inst, "AltInst"))
continue;

return createStringError(
Expand Down
2 changes: 1 addition & 1 deletion libc/fuzzing/math/Compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ValuesEqual(T x1, T x2) {
LIBC_NAMESPACE::fputil::FPBits<T> bits2(x2);
// If either is NaN, we want both to be NaN.
if (bits1.is_nan() || bits2.is_nan())
return bits2.is_nan() && bits2.is_nan();
return bits1.is_nan() && bits2.is_nan();

// For all other values, we want the values to be bitwise equal.
return bits1.uintval() == bits2.uintval();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3278,7 +3278,7 @@ bool AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
}

// If the index is still out of range then this isn't a pointer.
if (index > m_indexed_isa_cache.size())
if (index >= m_indexed_isa_cache.size())
return false;

LLDB_LOGF(log, "AOCRT::NPI Evaluate(ret_isa = 0x%" PRIx64 ")",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ GeneratePerfEventConfigValue(bool enable_tsc,
if (enable_tsc) {
if (Expected<uint32_t> offset = ReadIntelPTConfigFile(
kTSCBitOffsetFile, IntelPTConfigFileType::BitOffset))
config |= 1 << *offset;
config |= 1ULL << *offset;
else
return offset.takeError();
}
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ class RegionBuilderHelper {
isInteger(arg0) && arg0.getType().getIntOrFloatBitWidth() == 1;
bool tailFloatingPoint =
isFloatingPoint(arg0) && isFloatingPoint(arg1) && isFloatingPoint(arg2);
bool tailInteger = isInteger(arg0) && isInteger(arg1) && isInteger(arg1);
bool tailInteger = isInteger(arg0) && isInteger(arg1) && isInteger(arg2);
OpBuilder::InsertionGuard g(builder);
builder.setInsertionPointToEnd(&block);
switch (ternaryFn) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ScalableValueBoundsConstraintSet::computeScalableBound(

AffineMap bound = [&] {
if (boundType == BoundType::EQ && !invalidBound(lowerBound) &&
lowerBound[0] == lowerBound[0]) {
lowerBound[0] == upperBound[0]) {
return lowerBound[0];
} else if (boundType == BoundType::LB && !invalidBound(lowerBound)) {
return lowerBound[0];
Expand Down
2 changes: 1 addition & 1 deletion polly/lib/External/isl/isl_local_space.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ isl_size isl_local_space_var_offset(__isl_keep isl_local_space *ls,
isl_space *space;

space = isl_local_space_peek_space(ls);
if (space < 0)
if (space == NULL)
return isl_size_error;
switch (type) {
case isl_dim_param:
Expand Down
Loading