[all-commits] [llvm/llvm-project] d29924: [Attributor] Don't replace `addrspacecast (ptr nul...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue May 20 15:09:04 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d2992423e336b06a3c75b6f99aed6dd73abc3112
https://github.com/llvm/llvm-project/commit/d2992423e336b06a3c75b6f99aed6dd73abc3112
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-05-20 (Tue, 20 May 2025)
Changed paths:
M llvm/lib/Transforms/IPO/Attributor.cpp
M llvm/test/CodeGen/AMDGPU/addrspacecast.ll
A llvm/test/Transforms/Attributor/AMDGPU/do-not-replace-addrspacecast-with-constantpointernull.ll
A llvm/test/Transforms/Attributor/AMDGPU/lit.local.cfg
Log Message:
-----------
[Attributor] Don't replace `addrspacecast (ptr null to ptr addrspace(x))` with `ptr addrspace(x) null` (#126779)
`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