[all-commits] [llvm/llvm-project] dcd5a8: [Attributor] Don't replace `AddrSpaceCast` with `C...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Wed Feb 12 09:04:57 PST 2025
Branch: refs/heads/users/shiltian/do-not-replace-addrspacecast-with-constantpointernull
Home: https://github.com/llvm/llvm-project
Commit: dcd5a83b6a282532ccecd8d06bc2eaad2458148e
https://github.com/llvm/llvm-project/commit/dcd5a83b6a282532ccecd8d06bc2eaad2458148e
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-02-12 (Wed, 12 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