[all-commits] [llvm/llvm-project] 6ae31b: [Attributor] Don't replace `AddrSpaceCast` with `C...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Feb 11 10:55:39 PST 2025
Branch: refs/heads/users/shiltian/do-not-replace-addrspacecast-with-constantpointernull
Home: https://github.com/llvm/llvm-project
Commit: 6ae31b368b03fc6c648a45aca8c539005f6a838c
https://github.com/llvm/llvm-project/commit/6ae31b368b03fc6c648a45aca8c539005f6a838c
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-02-11 (Tue, 11 Feb 2025)
Changed paths:
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
A llvm/test/Transforms/Attributor/do-not-replace-addrspacecast-with-constantpointernull.ll
Log Message:
-----------
[Attributor] Don't replace `AddrSpaceCast` with `ConstantPointerNull`
`ConstantPointerNull` represents a pointer with value 0, but it doesn’t
necessarily mean a nullptr. `ptr addrspace(x) null` is not the same as
`addrspacecast (ptr null to ptr addrspace(x))` if the nullptr in AS x is not
zero. Therefore, we can't simply replace it.
Fixes #115083.
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