[all-commits] [llvm/llvm-project] 93c20b: [Attributor] Don't replace `AddrSpaceCast` with `C...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Thu Feb 13 21:36:35 PST 2025
Branch: refs/heads/users/shiltian/do-not-replace-addrspacecast-with-constantpointernull
Home: https://github.com/llvm/llvm-project
Commit: 93c20b208695d4d69334c80f2814be7c56213374
https://github.com/llvm/llvm-project/commit/93c20b208695d4d69334c80f2814be7c56213374
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-02-14 (Fri, 14 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