diff --git a/bolt/lib/Rewrite/LinuxKernelRewriter.cpp b/bolt/lib/Rewrite/LinuxKernelRewriter.cpp index 03b414b71caca..39ceeffc79c16 100644 --- a/bolt/lib/Rewrite/LinuxKernelRewriter.cpp +++ b/bolt/lib/Rewrite/LinuxKernelRewriter.cpp @@ -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( diff --git a/libc/fuzzing/math/Compare.h b/libc/fuzzing/math/Compare.h index 2b84ad3ab4621..8f06ed9c8cc10 100644 --- a/libc/fuzzing/math/Compare.h +++ b/libc/fuzzing/math/Compare.h @@ -20,7 +20,7 @@ ValuesEqual(T x1, T x2) { LIBC_NAMESPACE::fputil::FPBits 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(); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 0083b49965697..c43871b08191d 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -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 ")", diff --git a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp index 8c69989702c2a..f7a2d1d07142e 100644 --- a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp +++ b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp @@ -150,7 +150,7 @@ GeneratePerfEventConfigValue(bool enable_tsc, if (enable_tsc) { if (Expected offset = ReadIntelPTConfigFile( kTSCBitOffsetFile, IntelPTConfigFileType::BitOffset)) - config |= 1 << *offset; + config |= 1ULL << *offset; else return offset.takeError(); } diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp index 26d9d2b091750..8973e87c063b3 100644 --- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp +++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp @@ -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) { diff --git a/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp b/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp index 4a826f04e1f1d..88f02369cb7ab 100644 --- a/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp +++ b/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp @@ -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]; diff --git a/polly/lib/External/isl/isl_local_space.c b/polly/lib/External/isl/isl_local_space.c index 604e276a0d1f6..1bffcd544eb73 100644 --- a/polly/lib/External/isl/isl_local_space.c +++ b/polly/lib/External/isl/isl_local_space.c @@ -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: