[llvm-branch-commits] [llvm] [mlir] [WIP][IR][Constants] Change the semantic of `ConstantPointerNull` to represent an actual `nullptr` instead of a zero-value pointer (PR #183215)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 25 00:49:18 PST 2026
================
@@ -409,8 +467,10 @@ Constant *Constant::getZeroValue(Type *Ty) {
case Type::PPC_FP128TyID:
return ConstantFP::get(Ty->getContext(),
APFloat::getZero(Ty->getFltSemantics()));
- case Type::PointerTyID:
- return ConstantPointerNull::get(cast<PointerType>(Ty));
+ case Type::PointerTyID: {
+ auto *Zero = ConstantInt::get(Type::getInt8Ty(Ty->getContext()), 0);
----------------
arsenm wrote:
ConstantInt::getZero
https://github.com/llvm/llvm-project/pull/183215
More information about the llvm-branch-commits
mailing list