[llvm] [SCEV] Restrict wrap flags when construction same AR for multiple phis. (PR #80430)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 2 06:48:19 PST 2024
nikic wrote:
> Yes right! Ideally I'd like to invalidate all users, completely remove the old SCEV and add it again with the new flags. Updated the patch to use `forgetMemoizedResults`, but I am not sure if that would be enough.
I think the general approach is fragile, because it will only work for addrecs created from IR users. E.g. if SCEVExpander queries a canonical `{0,+,1}` addrec (with no IR relation), but you earlier already created `{0,+,1}<nuw>` from a dead IR addrec, the flag will not get cleared.
https://github.com/llvm/llvm-project/pull/80430
More information about the llvm-commits
mailing list