[llvm] [Attributor] Use known non-flat AS before `getAssumedAddrSpace` (PR #143221)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 8 19:05:04 PDT 2025
================
@@ -12592,19 +12592,38 @@ struct AAAddressSpaceImpl : public AAAddressSpace {
ChangeStatus updateImpl(Attributor &A) override {
uint32_t OldAddressSpace = AssumedAddressSpace;
+ unsigned FlatAS = A.getInfoCache().getFlatAddressSpace().value();
auto CheckAddressSpace = [&](Value &Obj) {
- if (isa<UndefValue>(&Obj))
+ // Ignore undef and poison.
+ if (isa<UndefValue>(&Obj) || isa<PoisonValue>(&Obj))
return true;
----------------
arsenm wrote:
`isa<UndefValue>` already covers undef and poison. However, I think in this context it's unsafe to handle undef. You shouldn't touch this in this PR
https://github.com/llvm/llvm-project/pull/143221
More information about the llvm-commits
mailing list