[llvm] [X86][AVX10.2] Support AVX10.2-COMEF new instructions. (PR #108063)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 20:40:06 PDT 2024


================
@@ -26060,32 +26060,67 @@ SDValue X86TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
       if (CC == ISD::SETLT || CC == ISD::SETLE)
         std::swap(LHS, RHS);
 
-      SDValue Comi = DAG.getNode(IntrData->Opc0, dl, MVT::i32, LHS, RHS);
+      // For AVX10.2, Support EQ and NE
+      bool HasAVX10_2_COMX =
+          Subtarget.hasAVX10_2() && (CC == ISD::SETEQ || CC == ISD::SETNE);
+
+      // AVX10.2 COMPARE supports only v2f64, v4f32 or v8f16
+      auto SVT = LHS.getSimpleValueType();
+      bool HasAVX10_2_COMX_Ty =
+          (SVT == MVT::v2f64) || (SVT == MVT::v4f32) || (SVT == MVT::v8f16);
----------------
phoebewang wrote:

The intrinsic doesn't support other types, you can assert for them though.

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


More information about the llvm-commits mailing list