[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 02:50:25 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:

I'm going to tentatively just flip using "CC ^ 4" but I'm not certain if all the inf/nan handling will be preserved?

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


More information about the llvm-commits mailing list