[llvm] [InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (PR #114278)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 11:55:46 PST 2024
MatzeB wrote:
> If we really want to check all shufflevectors, I think the transform should be further separated from the existing one and simplify all the shufflevectors at once. It makes little sense to check that all of them simplify and compute the replacement values, then discard all of that and replace a single one of them, and then repeat the whole process again for the next shufflevector.
@nikic
- Would you rather see this logic in a `visitPHINode` function that would then check all the users and optimize them all at once. I was considering doing that, but wasn't sure if people would apreciate the change in style as the transform rules would no longer be within `visitShuffleVector` where people may intuitively look for them.
- Or are you saying that we should rather just drop all the checks and just do the simple thing and always optimize regardless of amount of uses. In that case, what sort of qualification/testing would convince you that we don't regress on average?
https://github.com/llvm/llvm-project/pull/114278
More information about the llvm-commits
mailing list