[llvm] [X86] Move the AVX512 VSELECT(COND, 0, X) -> VSELECT(!COND, X, 0) fold to DAGToDAG (PR #145724)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 02:56:24 PDT 2025
davemgreen wrote:
> @davemgreen this should remove the need for the addition of isTargetCanonicalSelect in https://github.com/llvm/llvm-project/pull/145473 - please can you confirm?
Hi - Yes I gave this a check and it looks like that will be OK, if the vselect zero DAG combine is removed. Thanks for doing this.
I will say that this looks like it creates a new layer of combining between final optimization and selection - one that could get arbitrarily complex in the extreme. It does not feel to me like the new isTargetCanonicalSelect method in 145473 is a "hack" and it would seem like a better design overall to me to have the target able to control the canonicalizations in DAGCombining. If there is one that it does not want, or wants the opposite of, we shouldn't have the policy of not allowing the targets ways of turning them off.
But thanks for doing this.
https://github.com/llvm/llvm-project/pull/145724
More information about the llvm-commits
mailing list