[clang] [lld] [llvm] [WIP][IR][Constants] Change the semantic of `ConstantPointerNull` to represent an actual `nullptr` instead of a zero-value pointer (PR #166667)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 08:36:03 PST 2025
================
@@ -22,7 +22,7 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress {
; CHECK-LABEL: define i8 @test_load8
; CHECK-SAME: (ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr null)
+; CHECK-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr zeroinitializer)
----------------
arichardson wrote:
Where is this `ptr inttoptr 0` coming from? Shouldn't it be using `ConstantPointerNull`? That would reduce the diff quite a lot.
https://github.com/llvm/llvm-project/pull/166667
More information about the llvm-commits
mailing list