[llvm] [AssumptionCache] Deduplicate affected values in removeAffectedValues (PR #205441)
Krisitan Erik Olsen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 17:15:39 PDT 2026
Kristianerik wrote:
> sounds like a duplicate of #205275
Thanks for flagging the overlap. This is related to #205275 but covers a case that patch doesn't address. When separate_storage(ptr %p, ptr %p) produces duplicate entries with the same value and same bundle index, the first iteration of the outer loop can erase the AffectedValues entry entirely (when HasNonnull is false). On the second iteration, find_as returns end() and the continue skips the ExpectedMatches decrement, so the final assertion fires. I verified this by rebuilding with #205275 merged (assertions enabled) and running the #205378 reproducer. It still crashes.
I've updated this PR to build on top of #205275. It deduplicates by (Value *, Index) pair rather than by Value * alone, so it correctly handles cases where the same value appears under different bundle indices (as tested in dereferenceable.ll), while still filtering out true duplicates from separate_storage.
https://github.com/llvm/llvm-project/pull/205441
More information about the llvm-commits
mailing list