[Mlir-commits] [clang] [libcxxabi] [lldb] [llvm] [mlir] [polly] [RFC][NFCI][IR] Rename isNullValue and getNullValue to isZeroValue and getZeroValue (PR #195687)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon May 4 09:40:13 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxxabi

Author: Shilei Tian (shiltian)

<details>
<summary>Changes</summary>

Currently, a "null value" in LLVM means a zero value. We are moving toward
changing the semantics of `ConstantPointerNull` to represent a semantic null
pointer instead of a zero-valued pointer. As a result, the meaning of "null
value" will also change in the future.

This PR is a first step toward renaming the two widely used "null value"
interfaces to "zero value". Semantic "null value" interfaces will be added back
later together with the semantic changes to `ConstantPointerNull`.


---

Patch is 642.53 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/195687.diff


289 Files Affected:

- (modified) clang/include/clang/Basic/arm_mve_defs.td (+1-1) 
- (modified) clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h (+1-1) 
- (modified) clang/include/clang/CIR/Dialect/IR/CIRAttrs.td (+4-4) 
- (modified) clang/include/clang/CIR/Dialect/IR/CIROps.td (+34-34) 
- (modified) clang/lib/CIR/CodeGen/CIRGenBuilder.cpp (+1-1) 
- (modified) clang/lib/CIR/CodeGen/CIRGenBuilder.h (+5-5) 
- (modified) clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp (+3-3) 
- (modified) clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp (+2-2) 
- (modified) clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp (+14-14) 
- (modified) clang/lib/CIR/CodeGen/CIRGenExpr.cpp (+1-1) 
- (modified) clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp (+1-1) 
- (modified) clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp (+4-4) 
- (modified) clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp (+4-4) 
- (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (+9-9) 
- (modified) clang/lib/CIR/CodeGen/CIRGenFunction.cpp (+2-2) 
- (modified) clang/lib/CIR/CodeGen/CIRGenModule.cpp (+1-1) 
- (modified) clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp (+1-1) 
- (modified) clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp (+2-2) 
- (modified) clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMIR.cpp (+1-1) 
- (modified) clang/lib/CodeGen/CGBuiltin.cpp (+18-18) 
- (modified) clang/lib/CodeGen/CGCUDANV.cpp (+3-3) 
- (modified) clang/lib/CodeGen/CGCUDARuntime.cpp (+1-1) 
- (modified) clang/lib/CodeGen/CGCXXABI.cpp (+3-3) 
- (modified) clang/lib/CodeGen/CGCall.cpp (+4-4) 
- (modified) clang/lib/CodeGen/CGClass.cpp (+2-2) 
- (modified) clang/lib/CodeGen/CGDecl.cpp (+13-13) 
- (modified) clang/lib/CodeGen/CGDeclCXX.cpp (+2-2) 
- (modified) clang/lib/CodeGen/CGException.cpp (+5-5) 
- (modified) clang/lib/CodeGen/CGExpr.cpp (+9-9) 
- (modified) clang/lib/CodeGen/CGExprAgg.cpp (+1-1) 
- (modified) clang/lib/CodeGen/CGExprCXX.cpp (+5-5) 
- (modified) clang/lib/CodeGen/CGExprComplex.cpp (+7-7) 
- (modified) clang/lib/CodeGen/CGExprConstant.cpp (+11-11) 
- (modified) clang/lib/CodeGen/CGExprScalar.cpp (+23-23) 
- (modified) clang/lib/CodeGen/CGHLSLBuiltins.cpp (+3-3) 
- (modified) clang/lib/CodeGen/CGObjC.cpp (+6-6) 
- (modified) clang/lib/CodeGen/CGObjCGNU.cpp (+10-10) 
- (modified) clang/lib/CodeGen/CGObjCMac.cpp (+33-33) 
- (modified) clang/lib/CodeGen/CGOpenMPRuntime.cpp (+15-15) 
- (modified) clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp (+1-1) 
- (modified) clang/lib/CodeGen/CGPointerAuth.cpp (+2-2) 
- (modified) clang/lib/CodeGen/CGStmtOpenMP.cpp (+1-1) 
- (modified) clang/lib/CodeGen/CGVTables.cpp (+5-5) 
- (modified) clang/lib/CodeGen/CodeGenFunction.cpp (+1-1) 
- (modified) clang/lib/CodeGen/CodeGenFunction.h (+1-1) 
- (modified) clang/lib/CodeGen/CodeGenModule.cpp (+3-3) 
- (modified) clang/lib/CodeGen/ItaniumCXXABI.cpp (+7-6) 
- (modified) clang/lib/CodeGen/MicrosoftCXXABI.cpp (+12-12) 
- (modified) clang/lib/CodeGen/TargetBuiltins/ARM.cpp (+6-6) 
- (modified) clang/lib/CodeGen/TargetBuiltins/PPC.cpp (+3-2) 
- (modified) clang/lib/CodeGen/TargetBuiltins/RISCV.cpp (+3-3) 
- (modified) clang/lib/CodeGen/TargetBuiltins/WebAssembly.cpp (+2-2) 
- (modified) clang/lib/CodeGen/TargetBuiltins/X86.cpp (+19-19) 
- (modified) libcxxabi/test/DemangleTestCases.inc (+12-12) 
- (modified) lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (+3-3) 
- (modified) lldb/source/Plugins/ExpressionParser/Clang/InjectPointerSigningFixups.cpp (+1-1) 
- (modified) llvm/bindings/ocaml/llvm/llvm.mli (+3-3) 
- (modified) llvm/docs/MergeFunctions.rst (+1-1) 
- (modified) llvm/docs/ProgrammersManual.rst (+1-1) 
- (modified) llvm/docs/ReleaseNotes.md (+4-6) 
- (modified) llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst (+1-1) 
- (modified) llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/Chapter5/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/Chapter6/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/Chapter7/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/Chapter8/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/Chapter9/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp (+115-114) 
- (modified) llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp (+1-1) 
- (modified) llvm/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp (+101-106) 
- (modified) llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp (+1-1) 
- (modified) llvm/include/llvm-c/Core.h (+2-2) 
- (modified) llvm/include/llvm/Analysis/SparsePropagation.h (+1-1) 
- (modified) llvm/include/llvm/IR/Constant.h (+4-3) 
- (modified) llvm/include/llvm/IR/Constants.h (+1-1) 
- (modified) llvm/include/llvm/IR/FixedPointBuilder.h (+3-3) 
- (modified) llvm/include/llvm/IR/IRBuilder.h (+5-5) 
- (modified) llvm/include/llvm/IR/PatternMatch.h (+3-3) 
- (modified) llvm/include/llvm/Testing/Demangle/DemangleTestCases.inc (+12-12) 
- (modified) llvm/include/llvm/Transforms/InstCombine/InstCombiner.h (+1-1) 
- (modified) llvm/include/llvm/Transforms/Utils/Evaluator.h (+1-1) 
- (modified) llvm/lib/Analysis/BranchProbabilityInfo.cpp (+1-1) 
- (modified) llvm/lib/Analysis/ConstantFolding.cpp (+31-31) 
- (modified) llvm/lib/Analysis/GlobalsModRef.cpp (+1-1) 
- (modified) llvm/lib/Analysis/IVDescriptors.cpp (+1-1) 
- (modified) llvm/lib/Analysis/InlineCost.cpp (+1-1) 
- (modified) llvm/lib/Analysis/InstructionSimplify.cpp (+62-62) 
- (modified) llvm/lib/Analysis/LazyValueInfo.cpp (+8-8) 
- (modified) llvm/lib/Analysis/Lint.cpp (+1-1) 
- (modified) llvm/lib/Analysis/Local.cpp (+2-2) 
- (modified) llvm/lib/Analysis/MemoryBuiltins.cpp (+2-2) 
- (modified) llvm/lib/Analysis/MustExecute.cpp (+1-1) 
- (modified) llvm/lib/Analysis/ScalarEvolution.cpp (+1-1) 
- (modified) llvm/lib/Analysis/ValueTracking.cpp (+9-9) 
- (modified) llvm/lib/Analysis/VectorUtils.cpp (+4-4) 
- (modified) llvm/lib/AsmParser/LLParser.cpp (+3-3) 
- (modified) llvm/lib/Bitcode/Reader/BitcodeReader.cpp (+1-1) 
- (modified) llvm/lib/Bitcode/Writer/BitcodeWriter.cpp (+1-1) 
- (modified) llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (+3-3) 
- (modified) llvm/lib/CodeGen/AtomicExpandPass.cpp (+2-2) 
- (modified) llvm/lib/CodeGen/CodeGenPrepare.cpp (+12-12) 
- (modified) llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp (+3-3) 
- (modified) llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp (+4-4) 
- (modified) llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp (+3-3) 
- (modified) llvm/lib/CodeGen/GlobalISel/Utils.cpp (+1-1) 
- (modified) llvm/lib/CodeGen/InterleavedAccessPass.cpp (+2-2) 
- (modified) llvm/lib/CodeGen/IntrinsicLowering.cpp (+1-1) 
- (modified) llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp (+2-2) 
- (modified) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (+1-1) 
- (modified) llvm/lib/CodeGen/SelectionDAG/FastISel.cpp (+2-2) 
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (+4-5) 
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (+1-1) 
- (modified) llvm/lib/CodeGen/ShadowStackGCLowering.cpp (+4-4) 
- (modified) llvm/lib/CodeGen/WasmEHPrepare.cpp (+1-1) 
- (modified) llvm/lib/CodeGen/WinEHPrepare.cpp (+2-2) 
- (modified) llvm/lib/ExecutionEngine/ExecutionEngine.cpp (+3-3) 
- (modified) llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp (+1-1) 
- (modified) llvm/lib/Frontend/Offloading/OffloadWrapper.cpp (+1-1) 
- (modified) llvm/lib/Frontend/Offloading/Utility.cpp (+2-2) 
- (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (+21-21) 
- (modified) llvm/lib/FuzzMutate/IRMutator.cpp (+1-1) 
- (modified) llvm/lib/IR/AbstractCallSite.cpp (+1-1) 
- (modified) llvm/lib/IR/AsmWriter.cpp (+3-3) 
- (modified) llvm/lib/IR/AutoUpgrade.cpp (+23-23) 
- (modified) llvm/lib/IR/ConstantFold.cpp (+25-23) 
- (modified) llvm/lib/IR/Constants.cpp (+27-28) 
- (modified) llvm/lib/IR/Core.cpp (+4-4) 
- (modified) llvm/lib/IR/DebugInfo.cpp (+1-1) 
- (modified) llvm/lib/IR/Instructions.cpp (+1-1) 
- (modified) llvm/lib/IR/SafepointIRVerifier.cpp (+1-1) 
- (modified) llvm/lib/IR/StructuralHash.cpp (+1-1) 
- (modified) llvm/lib/IR/Verifier.cpp (+2-2) 
- (modified) llvm/lib/Target/AArch64/AArch64FastISel.cpp (+6-6) 
- (modified) llvm/lib/Target/AArch64/AArch64ISelLowering.cpp (+1-1) 
- (modified) llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp (+1-1) 
- (modified) llvm/lib/Target/AArch64/AArch64StackTagging.cpp (+4-4) 
- (modified) llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (+3-3) 
- (modified) llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp (+1-1) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp (+2-2) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp (+8-8) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp (+6-6) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp (+1-1) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.h (+1-1) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp (+8-8) 
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.cpp (+2-2) 
- (modified) llvm/lib/Target/DirectX/DXILFlattenArrays.cpp (+1-1) 
- (modified) llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp (+2-2) 
- (modified) llvm/lib/Target/DirectX/DXILOpLowering.cpp (+2-2) 
- (modified) llvm/lib/Target/DirectX/DXILResourceAccess.cpp (+1-1) 
- (modified) llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp (+1-1) 
- (modified) llvm/lib/Target/Hexagon/HexagonISelLowering.cpp (+1-1) 
- (modified) llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp (+5-5) 
- (modified) llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (+6-6) 
- (modified) llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp (+2-2) 
- (modified) llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp (+1-1) 
- (modified) llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp (+1-1) 
- (modified) llvm/lib/Target/SPIRV/SPIRVCtorDtorLowering.cpp (+1-1) 
- (modified) llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp (+1-1) 
- (modified) llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp (+1-1) 
- (modified) llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp (+4-4) 
- (modified) llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp (+1-1) 
- (modified) llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp (+1-1) 
- (modified) llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp (+1-1) 
- (modified) llvm/lib/Target/TargetLoweringObjectFile.cpp (+1-1) 
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp (+2-2) 
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp (+1-1) 
- (modified) llvm/lib/Target/X86/X86FastISel.cpp (+6-6) 
- (modified) llvm/lib/Target/X86/X86ISelLowering.cpp (+5-5) 
- (modified) llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp (+9-9) 
- (modified) llvm/lib/Target/X86/X86InstrInfo.cpp (+1-1) 
- (modified) llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp (+4-4) 
- (modified) llvm/lib/Target/X86/X86LowerAMXType.cpp (+1-1) 
- (modified) llvm/lib/Target/X86/X86PartialReduction.cpp (+4-4) 
- (modified) llvm/lib/Target/X86/X86TargetTransformInfo.cpp (+2-2) 
- (modified) llvm/lib/Target/X86/X86WinEHState.cpp (+2-2) 
- (modified) llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Coroutines/CoroFrame.cpp (+1-1) 
- (modified) llvm/lib/Transforms/IPO/Attributor.cpp (+3-3) 
- (modified) llvm/lib/Transforms/IPO/AttributorAttributes.cpp (+2-2) 
- (modified) llvm/lib/Transforms/IPO/FunctionAttrs.cpp (+1-1) 
- (modified) llvm/lib/Transforms/IPO/FunctionSpecialization.cpp (+3-3) 
- (modified) llvm/lib/Transforms/IPO/GlobalOpt.cpp (+3-3) 
- (modified) llvm/lib/Transforms/IPO/LowerTypeTests.cpp (+4-4) 
- (modified) llvm/lib/Transforms/IPO/OpenMPOpt.cpp (+2-2) 
- (modified) llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp (+1-1) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp (+3-3) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (+23-23) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (+10-10) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp (+13-14) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp (+101-101) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (+11-11) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp (+1-1) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp (+7-7) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp (+3-3) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (+6-6) 
- (modified) llvm/lib/Transforms/InstCombine/InstructionCombining.cpp (+17-17) 
- (modified) llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp (+12-12) 
- (modified) llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp (+3-3) 
- (modified) llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp (+7-7) 
- (modified) llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp (+35-35) 
- (modified) llvm/lib/Transforms/Instrumentation/PGOCtxProfLowering.cpp (+3-3) 
- (modified) llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp (+6-6) 
- (modified) llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/ConstraintElimination.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/EarlyCSE.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/GVN.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/GuardWidening.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/IndVarSimplify.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/InferAlignment.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Scalar/NewGVN.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/Reassociate.cpp (+7-7) 
- (modified) llvm/lib/Transforms/Scalar/Reg2Mem.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp (+7-7) 
- (modified) llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/CodeExtractor.cpp (+6-6) 
- (modified) llvm/lib/Transforms/Utils/Evaluator.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Utils/FunctionComparator.cpp (+3-3) 
- (modified) llvm/lib/Transforms/Utils/FunctionImportUtils.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/Local.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp (+4-4) 
- (modified) llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/ModuleUtils.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/PredicateInfo.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/SCCPSolver.cpp (+4-4) 
- (modified) llvm/lib/Transforms/Utils/SanitizerStats.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp (+6-5) 
- (modified) llvm/lib/Transforms/Utils/SimplifyCFG.cpp (+10-10) 
- (modified) llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp (+19-19) 
- (modified) llvm/lib/Transforms/Utils/VNCoercion.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/ValueMapper.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp (+5-5) 
- (modified) llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+17-17) 
- (modified) llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Vectorize/VectorCombine.cpp (+2-2) 
- (modified) llvm/tools/llubi/lib/Context.cpp (+1-1) 
- (modified) llvm/tools/llubi/lib/Library.cpp (+3-3) 
- (modified) llvm/tools/llubi/lib/Value.cpp (+4-4) 
- (modified) llvm/tools/llubi/lib/Value.h (+1-1) 
- (modified) llvm/tools/llubi/llubi.cpp (+1-1) 
- (modified) llvm/tools/llvm-reduce/ReducerWorkItem.cpp (+1-1) 
- (modified) llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp (+2-2) 
- (modified) llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp (+1-1) 
- (modified) llvm/tools/llvm-reduce/deltas/Utils.cpp (+1-1) 
- (modified) llvm/tools/llvm-stress/llvm-stress.cpp (+3-3) 
- (modified) llvm/unittests/Analysis/LoadsTest.cpp (+1-1) 
- (modified) llvm/unittests/Analysis/ScalarEvolutionTest.cpp (+5-5) 
- (modified) llvm/unittests/Analysis/ValueLatticeTest.cpp (+9-9) 
- (modified) llvm/unittests/AsmParser/AsmParserTest.cpp (+1-1) 
- (modified) llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp (+5-5) 
- (modified) llvm/unittests/IR/AsmWriterTest.cpp (+1-1) 
- (modified) llvm/unittests/IR/ConstantsTest.cpp (+20-20) 
- (modified) llvm/unittests/IR/DominatorTreeTest.cpp (+1-1) 
- (modified) llvm/unittests/IR/InstructionsTest.cpp (+60-60) 
- (modified) llvm/unittests/IR/IntrinsicsTest.cpp (+4-4) 
- (modified) llvm/unittests/IR/PatternMatch.cpp (+11-11) 
- (modified) llvm/unittests/IR/ValueHandleTest.cpp (+4-4) 
- (modified) llvm/unittests/IR/ValueTest.cpp (+1-1) 
- (modified) llvm/unittests/ProfileData/InstrProfTest.cpp (+1-1) 
- (modified) llvm/unittests/Target/X86/TernlogTest.cpp (+1-1) 
- (modified) llvm/unittests/Transforms/Utils/CloningTest.cpp (+1-1) 
- (modified) llvm/unittests/Transforms/Utils/LocalTest.cpp (+2-2) 
- (modified) llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp (+1-1) 
- (modified) llvm/unittests/Transforms/Utils/ValueMapperTest.cpp (+1-1) 
- (modified) llvm/unittests/Transforms/Vectorize/VPlanPatternMatchTest.cpp (+1-1) 
- (modified) mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td (+1-1) 
- (modified) mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp (+1-1) 
- (modified) mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp (+1-1) 
- (modified) mlir/lib/Target/LLVMIR/ModuleImport.cpp (+1-1) 
- (modified) mlir/lib/Target/LLVMIR/ModuleTranslation.cpp (+3-3) 
- (modified) polly/lib/CodeGen/IslExprBuilder.cpp (+1-1) 
- (modified) polly/lib/CodeGen/IslNodeBuilder.cpp (+1-1) 
- (modified) polly/lib/CodeGen/RuntimeDebugBuilder.cpp (+1-1) 
- (modified) polly/lib/Support/SCEVValidator.cpp (+1-1) 
- (modified) polly/lib/Transform/ZoneAlgo.cpp (+2-2) 


``````````diff
diff --git a/clang/include/clang/Basic/arm_mve_defs.td b/clang/include/clang/Basic/arm_mve_defs.td
index 222228bc0710b..dfb4685d56dee 100644
--- a/clang/include/clang/Basic/arm_mve_defs.td
+++ b/clang/include/clang/Basic/arm_mve_defs.td
@@ -98,7 +98,7 @@ def vreinterpret: CGFHelperFn<"ARMMVEVectorReinterpret">;
 def extend: CGHelperFn<"SignOrZeroExtend"> {
   let special_params = [IRBuilderIntParam<2, "bool">];
 }
-def zeroinit: IRFunction<"llvm::Constant::getNullValue">;
+def zeroinit: IRFunction<"llvm::Constant::getZeroValue">;
 def int_min: CGHelperFn<"ARMMVEConstantSplat<1,0>">;
 def int_max: CGHelperFn<"ARMMVEConstantSplat<0,1>">;
 def uint_max: CGHelperFn<"ARMMVEConstantSplat<1,1>">;
diff --git a/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h b/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
index 646fc7eb3c226..5eacbfed98795 100644
--- a/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+++ b/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
@@ -95,7 +95,7 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
   }
 
   // Creates constant null value for integral type ty.
-  cir::ConstantOp getNullValue(mlir::Type ty, mlir::Location loc) {
+  cir::ConstantOp getZeroValue(mlir::Type ty, mlir::Location loc) {
     return getConstant(loc, getZeroInitAttr(ty));
   }
 
diff --git a/clang/include/clang/CIR/Dialect/IR/CIRAttrs.td b/clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
index 1520999e3f85f..c4b1920b23747 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
@@ -315,7 +315,7 @@ def CIR_IntAttr : CIR_ValueLikeAttr<"Int", "int"> {
   let extraClassDeclaration = [{
     int64_t getSInt() const;
     uint64_t getUInt() const;
-    bool isNullValue() const;
+    bool isZeroValue() const;
     bool isSigned() const;
     bool isUnsigned() const;
     uint64_t getBitWidth() const;
@@ -328,7 +328,7 @@ def CIR_IntAttr : CIR_ValueLikeAttr<"Int", "int"> {
     uint64_t $cppClass::getUInt() const {
       return getValue().getZExtValue();
     }
-    bool $cppClass::isNullValue() const {
+    bool $cppClass::isZeroValue() const {
       return getValue() == 0;
     }
     bool $cppClass::isSigned() const {
@@ -521,7 +521,7 @@ def CIR_ConstPtrAttr : CIR_ValueLikeAttr<"ConstPtr", "ptr"> {
     }]>
   ];
   let extraClassDeclaration = [{
-    bool isNullValue() const { return getValue().getInt() == 0; }
+    bool isZeroValue() const { return getValue().getInt() == 0; }
   }];
 
   let assemblyFormat = [{
@@ -1009,7 +1009,7 @@ def CIR_TargetAddressSpaceAttr : CIR_Attr< "TargetAddressSpace",
     The TargetAddressSpaceAttr represents a target-specific numeric address space,
     corresponding to the LLVM IR `addrspace` qualifier and the clang
      `address_space` attribute.
-    
+
     A value of zero represents the default address space. The semantics of non-zero
     address spaces are target-specific.
 
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index 97d623ba5e6d9..2ec4b10c53e7e 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -244,7 +244,7 @@ def CIR_CastOp : CIR_Op<"cast", [
     ```
     %4 = cir.cast int_to_bool %3 : i32 -> !cir.bool
     ...
-    %x = cir.cast array_to_ptrdecay %0 
+    %x = cir.cast array_to_ptrdecay %0
        : !cir.ptr<!cir.array<i32 x 10>> -> !cir.ptr<i32>
     ```
   }];
@@ -429,7 +429,7 @@ def CIR_ConstantOp : CIR_Op<"const", [
   let extraClassDeclaration = [{
     bool isNullPtr() {
       if (const auto ptrAttr = mlir::dyn_cast<cir::ConstPtrAttr>(getValue()))
-        return ptrAttr.isNullValue();
+        return ptrAttr.isZeroValue();
       return false;
     }
 
@@ -741,7 +741,7 @@ def CIR_VecMaskedLoadOp : CIR_Op<"vec.masked_load", [
   let results = (outs CIR_AnyType:$result);
 
   let assemblyFormat = [{
-    (`align` `(` $alignment^ `)`)? 
+    (`align` `(` $alignment^ `)`)?
     $addr `,` $mask `,` $pass_thru
     `:` qualified(type($addr)) `,` type($mask) `,` type($pass_thru)
     `->` type($result)
@@ -1433,9 +1433,9 @@ def CIR_SwitchOp : CIR_Op<"switch", [
     is an integral condition value.
 
     Besides taking an integer condition and CIR regions, it also accepts an
-    `all_enum_cases_covered` attribute indicating whether all enum cases are 
-    handled by the operation. Note that the presence of a default CaseOp does 
-    not imply `all_enum_cases_covered`. The original AST switch must explicitly list 
+    `all_enum_cases_covered` attribute indicating whether all enum cases are
+    handled by the operation. Note that the presence of a default CaseOp does
+    not imply `all_enum_cases_covered`. The original AST switch must explicitly list
     every enum case.
 
     The set of `cir.case` operations and their enclosing `cir.switch`
@@ -1564,7 +1564,7 @@ def CIR_SwitchOp : CIR_Op<"switch", [
     ```
   }];
 
-  let arguments = (ins 
+  let arguments = (ins
     CIR_IntType:$condition,
     UnitAttr:$all_enum_cases_covered
   );
@@ -1578,7 +1578,7 @@ def CIR_SwitchOp : CIR_Op<"switch", [
   ];
 
   let assemblyFormat = [{
-    `(` $condition `:` qualified(type($condition)) `)` 
+    `(` $condition `:` qualified(type($condition)) `)`
      (`all_enum_cases_covered` $all_enum_cases_covered^)?
     $body
     attr-dict
@@ -2404,7 +2404,7 @@ def CIR_AddOp : CIR_BinaryOpWithOverflowFlags<"add", CIR_AnyArithType> {
     or unsigned overflow occurs, respectively. The optional `sat` (saturated)
     attribute clamps the result to the type's representable range instead of
     wrapping. The `nsw`/`nuw` flags and `sat` are mutually exclusive.
-    
+
     Example:
 
     ```
@@ -2432,7 +2432,7 @@ def CIR_SubOp : CIR_BinaryOpWithOverflowFlags<"sub", CIR_AnyArithType> {
     or unsigned overflow occurs, respectively. The optional `sat` (saturated)
     attribute clamps the result to the type's representable range. The
     `nsw`/`nuw` flags and `sat` are mutually exclusive.
-    
+
     Example:
 
     ```
@@ -2467,7 +2467,7 @@ def CIR_MulOp : CIR_BinaryOp<"mul", CIR_AnyArithType> {
     %3 = cir.mul %a, %b : !cir.float
     ```
   }];
-  
+
   let arguments = (ins
     CIR_AnyArithType:$lhs, CIR_AnyArithType:$rhs,
     UnitProp:$no_signed_wrap,
@@ -2513,7 +2513,7 @@ def CIR_RemOp : CIR_BinaryOp<"rem", CIR_AnyArithType> {
     The `cir.rem` operation computes the remainder of division on integer or
     floating-point operands. Both operands and the result must have the same
     type.
-    
+
     Example:
 
     ```
@@ -2535,7 +2535,7 @@ def CIR_AndOp : CIR_BinaryOp<"and", CIR_AnyBitwiseType, [
   let description = [{
     The `cir.and` operation performs a bitwise AND on integer operands.
     Both operands and the result must have the same integer type.
-    
+
     Example:
 
     ```
@@ -2556,7 +2556,7 @@ def CIR_OrOp : CIR_BinaryOp<"or", CIR_AnyBitwiseType, [
   let description = [{
     The `cir.or` operation performs a bitwise OR on integer operands.
     Both operands and the result must have the same integer type.
-    
+
     Example:
 
     ```
@@ -2684,13 +2684,13 @@ def CIR_SelectOp : CIR_Op<"select", [
     The `cir.select` operation takes three operands. The first operand
     `condition` is either a boolean value of type `!cir.bool` or a boolean
     vector of type `!cir.bool`.  The second and the third operand can be of
-    any CIR types, but their types must be the same. If the first operand 
+    any CIR types, but their types must be the same. If the first operand
     is `true`, the operation yields its second operand. Otherwise, the
     operation yields its third operand.
 
-    In the case where the first operand is a boolean vector, then the second 
+    In the case where the first operand is a boolean vector, then the second
     and third operand needs to also be of some vectors of the same type to
-    each other and that the number of elements of all three operands needs to 
+    each other and that the number of elements of all three operands needs to
     be the same as well.
 
     Example:
@@ -2703,7 +2703,7 @@ def CIR_SelectOp : CIR_Op<"select", [
     ```
   }];
 
-  let arguments = (ins 
+  let arguments = (ins
     CIR_ScalarOrVectorOf<CIR_BoolType>:$condition,
     CIR_AnyType:$true_value,
     CIR_AnyType:$false_value
@@ -3704,7 +3704,7 @@ def CIR_FuncOp : CIR_Op<"func", [
 
     // Inline information
     cir.func no_inline @some_method(...)
-    
+
     // Builtin function
     cir.func builtin @__builtin_coro_end(!cir.ptr<i8>, !cir.bool) -> !cir.bool
     // Coroutine
@@ -4077,7 +4077,7 @@ def CIR_TryCallOp : CIR_CallOpBase<"try_call",[
     Similar to `cir.call` but requires two destination blocks,
     one which is used if the call returns without throwing an
     exception (the "normal" destination) and another which is used
-    if an exception is thrown (the "unwind" destination). 
+    if an exception is thrown (the "unwind" destination).
 
     This operation is used only after the CFG flatterning pass.
 
@@ -4107,7 +4107,7 @@ def CIR_TryCallOp : CIR_CallOpBase<"try_call",[
 
   let arguments = commonArgs;
   let results = (outs Optional<CIR_AnyType>:$result);
-  let successors = (successor 
+  let successors = (successor
     AnySuccessor:$normalDest,
     AnySuccessor:$unwindDest
   );
@@ -5437,7 +5437,7 @@ def CIR_BaseDataMemberOp : CIR_Op<"base_data_member", [Pure]> {
 
   let hasVerifier = 1;
   let hasLLVMLowering = false;
-  let hasCXXABILowering = true;  
+  let hasCXXABILowering = true;
 }
 
 def CIR_DerivedDataMemberOp : CIR_Op<"derived_data_member", [Pure]> {
@@ -5462,7 +5462,7 @@ def CIR_DerivedDataMemberOp : CIR_Op<"derived_data_member", [Pure]> {
 
   let hasVerifier = 1;
   let hasLLVMLowering = false;
-  let hasCXXABILowering = true;  
+  let hasCXXABILowering = true;
 }
 
 //===----------------------------------------------------------------------===//
@@ -5500,7 +5500,7 @@ def CIR_BaseMethodOp : CIR_Op<"base_method", [Pure]> {
 
   let hasVerifier = 1;
   let hasLLVMLowering = false;
-  let hasCXXABILowering = true;  
+  let hasCXXABILowering = true;
 }
 
 def CIR_DerivedMethodOp : CIR_Op<"derived_method", [Pure]> {
@@ -5534,7 +5534,7 @@ def CIR_DerivedMethodOp : CIR_Op<"derived_method", [Pure]> {
 
   let hasVerifier = 1;
   let hasLLVMLowering = false;
-  let hasCXXABILowering = true;  
+  let hasCXXABILowering = true;
 }
 
 //===----------------------------------------------------------------------===//
@@ -5969,7 +5969,7 @@ def CIR_BitReverseOp : CIR_BitOpBase<"bitreverse",
     %1 = cir.bitreverse %0: !u32i
     ```
   }];
-  
+
   let append traits = [Involution];
 }
 
@@ -5994,7 +5994,7 @@ def CIR_ByteSwapOp : CIR_BitOpBase<"byte_swap",
     %1 = cir.byte_swap %0 : !u32i
     ```
   }];
-  
+
   let append traits = [Involution];
 }
 
@@ -6255,7 +6255,7 @@ def CIR_PrefetchOp : CIR_Op<"prefetch"> {
     $locality is a temporal locality specifier ranging from (0) - no locality,
     to (3) - extremely local, keep in cache. If $locality is not present, the
     default value is 3.
-    
+
     $isWrite specifies whether the prefetch is for a 'read' or 'write'. If
     $isWrite is not specified, it means that prefetch is prepared for 'read'.
   }];
@@ -6394,7 +6394,7 @@ def CIR_PtrDiffOp : CIR_Op<"ptr_diff", [Pure, SameTypeOperands]> {
   let results = (outs CIR_AnyFundamentalIntType:$result);
 
   let assemblyFormat = [{
-    $lhs `,` $rhs  `:` qualified(type($lhs)) `->` qualified(type($result)) 
+    $lhs `,` $rhs  `:` qualified(type($lhs)) `->` qualified(type($result))
     attr-dict
   }];
 }
@@ -6416,7 +6416,7 @@ class CIR_UnaryFPToFPBuiltinOp<string mnemonic, string llvmOpName>
 
 def CIR_SqrtOp : CIR_UnaryFPToFPBuiltinOp<"sqrt", "SqrtOp"> {
   let summary = "Floating-point square root operation";
-  
+
   let description = [{
     Computes the square root of a floating-point value or vector.
 
@@ -7279,10 +7279,10 @@ def CIR_EhTypeIdOp : CIR_Op<"eh.typeid",
 def CIR_EhSetjmpOp : CIR_Op<"eh.setjmp"> {
   let summary = "CIR setjmp operation";
   let description = [{
-    Saves call-site information (e.g., stack pointer, instruction pointer, 
-    signal mask, and other registers) in memory at `env` for use by longjmp(). 
+    Saves call-site information (e.g., stack pointer, instruction pointer,
+    signal mask, and other registers) in memory at `env` for use by longjmp().
     In this case, setjmp() returns 0. Following a successful longjmp(),
-    execution proceeds from cir.eh.setjmp with the operation yielding a 
+    execution proceeds from cir.eh.setjmp with the operation yielding a
     non-zero value.
 
     Examples:
@@ -7855,7 +7855,7 @@ def CIR_AtomicCmpXchgOp : CIR_Op<"atomic.cmpxchg", [
     allows "spurious failures", meaning that be treated as if the comparison
     failed and not exchange values even if `*ptr` and `expected` indeed compare
     equal.
-    
+
     The type of `expected` and `desired` must be the same. The pointee type of
     `ptr` must be the same as the type of `expected` and `desired`.
 
diff --git a/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp
index c48afa0c7c793..748ce3184eca1 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp
@@ -208,7 +208,7 @@ mlir::Attribute clang::CIRGen::CIRGenBuilderTy::getConstRecordOrZeroAttr(
 
   // Return zero or anonymous constant record.
   const bool isZero = llvm::all_of(
-      arrayAttr, [&](mlir::Attribute a) { return isNullValue(a); });
+      arrayAttr, [&](mlir::Attribute a) { return isZeroValue(a); });
   if (isZero)
     return cir::ZeroAttr::get(recordTy);
   return cir::ConstRecordAttr::get(recordTy, arrayAttr);
diff --git a/clang/lib/CIR/CodeGen/CIRGenBuilder.h b/clang/lib/CIR/CodeGen/CIRGenBuilder.h
index f8d3d93e49075..1a28f9ca2c737 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuilder.h
+++ b/clang/lib/CIR/CodeGen/CIRGenBuilder.h
@@ -279,15 +279,15 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
 
   // Return true if the value is a null constant such as null pointer, (+0.0)
   // for floating-point or zero initializer
-  bool isNullValue(mlir::Attribute attr) const {
+  bool isZeroValue(mlir::Attribute attr) const {
     if (mlir::isa<cir::ZeroAttr>(attr))
       return true;
 
     if (const auto ptrVal = mlir::dyn_cast<cir::ConstPtrAttr>(attr))
-      return ptrVal.isNullValue();
+      return ptrVal.isZeroValue();
 
     if (const auto intVal = mlir::dyn_cast<cir::IntAttr>(attr))
-      return intVal.isNullValue();
+      return intVal.isZeroValue();
 
     if (const auto boolVal = mlir::dyn_cast<cir::BoolAttr>(attr))
       return !boolVal.getValue();
@@ -305,7 +305,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
         // FIXME(cir): the record's ID should not be considered a member.
         if (mlir::isa<mlir::StringAttr>(elt))
           continue;
-        if (!isNullValue(elt))
+        if (!isZeroValue(elt))
           return false;
       }
       return true;
@@ -317,7 +317,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
 
       return llvm::all_of(
           mlir::cast<mlir::ArrayAttr>(arrayVal.getElts()),
-          [&](const mlir::Attribute &elt) { return isNullValue(elt); });
+          [&](const mlir::Attribute &elt) { return isZeroValue(elt); });
     }
     return false;
   }
diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
index 5af132d7c0691..f06432d749cc5 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
@@ -103,7 +103,7 @@ static RValue emitBuiltinBitOpWithFallback(CIRGenFunction &cgf,
 
   CIRGenBuilderTy &builder = cgf.getBuilder();
   mlir::Location loc = cgf.getLoc(e->getSourceRange());
-  mlir::Value zero = builder.getNullValue(arg.getType(), loc);
+  mlir::Value zero = builder.getZeroValue(arg.getType(), loc);
   mlir::Value isZero =
       builder.createCompare(loc, cir::CmpOpKind::eq, arg, zero);
   mlir::Value fallbackValue = cgf.emitScalarExpr(e->getArg(1));
@@ -1692,7 +1692,7 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
         builder.createIsFPClass(loc, arg, cir::FPClassTest::Infinity);
     mlir::Value isNeg = emitSignBit(loc, *this, arg);
     mlir::Type intTy = convertType(e->getType());
-    cir::ConstantOp zero = builder.getNullValue(intTy, loc);
+    cir::ConstantOp zero = builder.getZeroValue(intTy, loc);
     cir::ConstantOp one = builder.getConstant(loc, cir::IntAttr::get(intTy, 1));
     cir::ConstantOp negativeOne =
         builder.getConstant(loc, cir::IntAttr::get(intTy, -1));
@@ -1811,7 +1811,7 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
     Address destPtr = emitPointerWithAlignment(e->getArg(0));
     Address destPtrCast = destPtr.withElementType(builder, cgm.voidTy);
     mlir::Value size = emitScalarExpr(e->getArg(1));
-    mlir::Value zero = builder.getNullValue(builder.getUInt8Ty(), loc);
+    mlir::Value zero = builder.getZeroValue(builder.getUInt8Ty(), loc);
     assert(!cir::MissingFeatures::sanitizers());
     builder.createMemSet(loc, destPtrCast, zero, size);
     assert(!cir::MissingFeatures::generateDebugInfo());
diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
index 834f66586833b..e6ee81dd4d34b 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
@@ -341,7 +341,7 @@ emitAArch64CompareBuiltinExpr(CIRGenFunction &cgf, CIRGenBuilderTy &builder,
     src = builder.createBitcast(src, retTy);
   }
 
-  mlir::Value zero = builder.getNullValue(src.getType(), loc);
+  mlir::Value zero = builder.getZeroValue(src.getType(), loc);
 
   if (!scalarCmp)
     return builder.createVecCompare(loc, kind, src, zero);
@@ -1038,7 +1038,7 @@ CIRGenFunction::emitAArch64SVEBuiltinExpr(unsigned builtinID,
 
     // Zero-ing predication
     if (typeFlags.getMergeType() == SVETypeFlags::MergeZeroExp) {
-      auto null = builder.getNullValue(convertType(expr->getType()),
+      auto null = builder.getZeroValue(convertType(expr->getType()),
                                        getLoc(expr->getExprLoc()));
       ops.insert(ops.begin(), null);
     }
diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
index 6ca8a0e7a460f..d59f98ccbb280 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
@@ -359,7 +359,7 @@ static mlir::Value emitX86MaskedCompareResult(CIRGenBuilderTy &builder,
       indices.push_back(cir::IntAttr::get(i64Ty, i % numElts + numElts));
 
     // This should shuffle between cmp (first vector) and null (second vector)
-    mlir::Value nullVec = builder.getNullValue(cmp.getType(), loc);
+    mlir::Value nullVec = builder.getZeroValue(cmp.getType(), loc);
     cmp = builder.createVecShuffle(loc, cmp, nullVec, indices);
   }
   return builder.createBitcast(cmp, builder.getUIntNTy(std::max(numElts, 8U)));
@@ -375,7 +375,7 @@ emitX86MaskedCompare(CIRGenBuilderTy &builder, unsigned cc, bool isSigned,
   unsigned numElts = cast<cir::VectorType>(ops[0].getType()).getSize();
   mlir::Value cmp;
   if (cc == 3) {
-    cmp = builder.getNullValue(
+    cmp = builder.getZeroValue(
         cir::VectorType::get(builder.getSIntNTy(1), numElts), loc);
   } else if (cc == 7) {
     cir::VectorType resultTy =
@@ -426,7 +426,7 @@ static std::optional<mlir::Value> emitX86ConvertToMask(CIRGenFunction &cgf,
                                                        CIRGenBuilderTy &builder,
                                                        mlir::Value in,
                                                        mlir::Location loc) {
-  cir::ConstantOp zero = builder.getNullValue(in.getType(), loc);
+  cir::ConstantOp zero = builder.getZeroValue(in.getType(), loc);
   return emitX86MaskedCompare(builder, 1, true, {in, zero}, loc);
 }
 
@@ -596,7 +596,7 @@ static mlir::Value emitX86vpcom(CIRGenBuilderTy &builder, mlir::Location loc,
     pred = cir::CmpOpKind::ne;
     break;
   case 0x6:
-    return builder.getNullValue(ty, loc); // FALSE
+    return builder.getZeroValue(ty, loc); // FALSE
   case 0x7: {
     llvm::APInt allOnes = llvm::APInt::getAllOnes(elementTy.getWidth());
     return cir::VecSplatOp::create(
@@ -706,7 +706,7 @@ sta...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/195687


More information about the Mlir-commits mailing list