[llvm] [RFC][WIP][X86] Attempt to move the AVX512 VSELECT(COND, 0, X) -> VSELECT(!COND, X, 0) fold to DAGToDAG (PR #145724)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 00:52:58 PDT 2025


================
@@ -5,7 +5,8 @@ define void @PR117684(i1 %cond, <8 x float> %vec, ptr %ptr1, ptr %ptr2) #0 {
 ; CHECK-LABEL: PR117684:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    vxorps %xmm1, %xmm1, %xmm1
-; CHECK-NEXT:    vcmpnltss %xmm1, %xmm0, %k1
+; CHECK-NEXT:    vcmpltss %xmm1, %xmm0, %k0
+; CHECK-NEXT:    knotb %k0, %k1
----------------
RKSimon wrote:

Do we have a helper to inverse FCMP codes? We have one for swapping/commutation but I can't find anything for NOT(FCMP(X,Y,I)) -> FCMP(X,Y,NOT(I)).

https://github.com/llvm/llvm-project/pull/145724


More information about the llvm-commits mailing list