[llvm] [X86] combinePTESTCC - fold PTESTZ(X,SIGNMASK) -> VTESTPD/PSZ(X,X) on AVX targets (PR #165676)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 02:16:17 PDT 2025
================
@@ -48859,6 +48859,26 @@ static SDValue combinePTESTCC(SDValue EFLAGS, X86::CondCode &CC,
if (ISD::isBuildVectorAllOnes(Op1.getNode()))
return DAG.getNode(EFLAGS.getOpcode(), SDLoc(EFLAGS), VT, Op0, Op0);
+ // Attempt to convert PTESTZ(X,SIGNMASK) -> VTESTPD/PSZ(X,X) on AVX targets.
----------------
RKSimon wrote:
Nice catch! Yes, we should - all the similar folds in combinePTESTCC seem to be missing that.
https://github.com/llvm/llvm-project/pull/165676
More information about the llvm-commits
mailing list