[llvm] [X86][AVX512] Use comx for compare (PR #113567)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 17:43:28 PDT 2024


================
@@ -2292,8 +2298,10 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
     setOperationAction(ISD::FP_EXTEND,            MVT::f32, Legal);
     setOperationAction(ISD::STRICT_FP_EXTEND,     MVT::f32, Legal);
 
-    setCondCodeAction(ISD::SETOEQ, MVT::f16, Expand);
-    setCondCodeAction(ISD::SETUNE, MVT::f16, Expand);
+    setCondCodeAction(ISD::SETOEQ, MVT::f16,
+                      Subtarget.hasAVX10_2() ? Custom : Expand);
+    setCondCodeAction(ISD::SETUNE, MVT::f16,
+                      Subtarget.hasAVX10_2() ? Custom : Expand);
----------------
phoebewang wrote:

See https://github.com/llvm/llvm-project/commit/2c9b981b9d8541d7c9e026baff1325e1708caeae
I don't see any problem on my side.
Maybe you was misled. The diff above was to demonstrate the change in function `X86TargetLowering`, so I omitted the change in `LowerSETCC`. I'm surprised you didn't explore along this way.

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


More information about the llvm-commits mailing list