We naively broke all incoming values, assuming they'd be unique. However it's not illegal to have multiple occurences of, e.g. `[BB0, V0]` in a PHI node. What's illegal though is having the same basic block multiple times but with different values, and it's exactly what the transform caused. This broke in some rare applications where the pattern arised. Now we cache the `BasicBlock, Value` pairs we're breaking so we can reuse the values and preserve this invariant. Solves SWDEV-399460 Reviewed By: #amdgpu, rovka Differential Revision: https://reviews.llvm.org/D151069
85 KiB
85 KiB