[llvm] [X86] Convert FP compares split by a nested logic op to FP logic (PR #226222)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 06:15:58 PDT 2026


================
@@ -52669,6 +52688,73 @@ static SDValue convertIntLogicToFPLogic(unsigned Opc, const SDLoc &DL, EVT VT,
   assert((Opc == ISD::OR || Opc == ISD::AND || Opc == ISD::XOR) &&
          "Unexpected bit opcode");
 
+  using namespace SDPatternMatch;
+  auto IsLegalFPType = [&](EVT FPVT) {
+    return (Subtarget.hasSSE1() && FPVT == MVT::f32) ||
+           (Subtarget.hasSSE2() && FPVT == MVT::f64) ||
+           (Subtarget.hasFP16() && FPVT == MVT::f16);
----------------
Andarwinux wrote:

and bf16 for AVX10.2?

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


More information about the llvm-commits mailing list