[llvm] [WIP][IR][Constants] Change the semantic of `ConstantPointerNull` to represent an actual `nullptr` instead of a zero-value pointer (PR #166667)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 11:45:25 PST 2025
================
@@ -193,9 +193,11 @@ constexpr DataLayout::PrimitiveSpec DefaultVectorSpecs[] = {
};
// Default pointer type specifications.
-constexpr DataLayout::PointerSpec DefaultPointerSpecs[] = {
+const DataLayout::PointerSpec DefaultPointerSpecs[] = {
----------------
shiltian wrote:
I thought about that, but we might want to allow a target to specify that the `nullptr` is an arbitrary bit pattern to be more future proof such that LLVM will not try any folding regarding those casts involving `nullptr`. I added `'c'` as the flag to specify that.
https://github.com/llvm/llvm-project/pull/166667
More information about the llvm-commits
mailing list