[llvm] [X86] fold AND(X,SEXT(SETCC())) -> SELECT(SETCC(),X,0) to support AVX512 predicated {k}{z} masks (PR #131788)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 07:17:32 PDT 2025
================
@@ -51481,6 +51483,22 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
}
}
+ // On AVX512 targets, attempt to reverse foldVSelectToSignBitSplatMask.
+ // to make use of predicated selects.
+ // AND(X,SEXT(SETCC())) -> SELECT(SETCC(),X,0)
----------------
RKSimon wrote:
The legality checks should protect us from that - I'll leave it for now and will experiment for a future patch for review
https://github.com/llvm/llvm-project/pull/131788
More information about the llvm-commits
mailing list