[all-commits] [llvm/llvm-project] 208bab: [RFC][IR] Remove `Constant::isZeroValue`
Shilei Tian via All-commits
all-commits at lists.llvm.org
Sat Feb 14 19:17:52 PST 2026
Branch: refs/heads/users/shiltian/remove-isZeroValue
Home: https://github.com/llvm/llvm-project
Commit: 208bab7a155aa901aa82c99fb40145c2b78430cb
https://github.com/llvm/llvm-project/commit/208bab7a155aa901aa82c99fb40145c2b78430cb
Author: Shilei Tian <i at tianshilei.me>
Date: 2026-02-14 (Sat, 14 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`
`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 surface. 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