[llvm] [LLVM][SelectionDAG] Don't legalise splat constants until required. (PR #143571)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 08:16:29 PDT 2025
================
@@ -48121,8 +48121,9 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
// Check if the first operand is all zeros and Cond type is vXi1.
// If this an avx512 target we can improve the use of zero masking by
// swapping the operands and inverting the condition.
- if (N->getOpcode() == ISD::VSELECT && Cond.hasOneUse() &&
- Subtarget.hasAVX512() && CondVT.getVectorElementType() == MVT::i1 &&
+ if (!DCI.isBeforeLegalize() && N->getOpcode() == ISD::VSELECT &&
----------------
topperc wrote:
It does fire and is responsible for some of the regressions. The NOT that gets created can't be folded into X86ISD::CMPM.
https://github.com/llvm/llvm-project/pull/143571
More information about the llvm-commits
mailing list