[all-commits] [llvm/llvm-project] 70905e: [RFC][IR] Remove `Constant::isZeroValue` (#181521)
Shilei Tian via All-commits
all-commits at lists.llvm.org
Sun Feb 15 09:07:04 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 70905e0afae2e2f14c405bca514494c5b1449822
https://github.com/llvm/llvm-project/commit/70905e0afae2e2f14c405bca514494c5b1449822
Author: Shilei Tian <i at tianshilei.me>
Date: 2026-02-15 (Sun, 15 Feb 2026)
Changed paths:
M clang/lib/CodeGen/CGDecl.cpp
M clang/lib/CodeGen/ItaniumCXXABI.cpp
M llvm/docs/ReleaseNotes.md
M llvm/include/llvm/IR/Constant.h
M llvm/lib/Analysis/BranchProbabilityInfo.cpp
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/lib/Analysis/Lint.cpp
M llvm/lib/Analysis/Local.cpp
M llvm/lib/Analysis/MustExecute.cpp
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
M llvm/lib/CodeGen/InterleavedAccessPass.cpp
M llvm/lib/FuzzMutate/IRMutator.cpp
M llvm/lib/IR/AutoUpgrade.cpp
M llvm/lib/IR/Constants.cpp
M llvm/lib/IR/DebugInfo.cpp
M llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
M llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
M llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
M llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
M llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
M llvm/lib/Target/X86/X86LowerAMXType.cpp
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
M llvm/unittests/Analysis/ValueLatticeTest.cpp
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
M polly/lib/Support/SCEVValidator.cpp
M polly/lib/Transform/ZoneAlgo.cpp
Log Message:
-----------
[RFC][IR] Remove `Constant::isZeroValue` (#181521)
`Constant::isZeroValue` currently behaves same as
`Constant::isNullValue` for all types except floating-point, where it
additionally returns true for negative zero (`-0.0`). However, in
practice, almost all callers operate on integer/pointer types where the
two are equivalent, and the few FP-relevant callers have no meaningful
dependence on the `-0.0` behavior.
This PR removes `isZeroValue` to eliminate the confusing API. All
callers are changed to `isNullValue` with no test failures.
`isZeroValue` will be reintroduced in a future change with clearer
semantics: when null pointers may have non-zero bit patterns,
`isZeroValue` will check for bitwise-all-zeros, while `isNullValue` will
check for the semantic null (which
may be non-zero).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list