arsenm wrote: > This is exactly the distinct I'm trying to get at. Avoiding the creation of a > 1-2 element shuffle seems quite reasonable. Avoiding the creation of a 100 > element splat shuffle does not. I think you need to add an explicit condition > in terms of the number elements in the result, not the number of _unique_ > elements in the result.
This is enough to solve my immediate issue to restrict it to a single extract use in the build_vector. However it does seem to be much more conservative than necessary. This new heuristic gives up the x86 improvements. I see many lit improvements with various more aggressive variants, but regressions in others. I think this would require more time working on x86, I think some of the regressions are due to missing optimizations there https://github.com/llvm/llvm-project/pull/122672 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits