[PATCH] D52555: [X86] Fix use SSE registers if no-x87 is selected.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 09:34:58 PDT 2018


niravd marked an inline comment as done.
niravd added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:282
+        setOperationAction(ISD::FP_TO_UINT, MVT::i32, Promote);
       setOperationAction(ISD::FP_TO_UINT   , MVT::i64  , Expand);
     }
----------------
nickdesaulniers wrote:
> How come not also this case? Or any of the ISD::FP_TO_SINT?
Good catch.  This looks was a not reverted change from a failed simplification. Reverted


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:552
+  } else if (X86ScalarSSEf32 &&
+             (UseX87 || (!useSoftFloat() && Subtarget.is64Bit()))) {
     // Use SSE for f32, x87 for f64.
----------------
nickdesaulniers wrote:
> Below (L1947) you check `Subtarget.is64Bit() || Subtarget.hasX87()`, so I'm curious here why the additional `!useSoftFloat()`?
If we're using SoftFloat we don't want f32/f64 to have an associated register class so we will fall back to the integer registers. 

Ideally we'd be able to still use the SSE1 registers for the memory shuffling operations, but that requires more plumbing and GCC doesn't use XMM registers in this case so I've left it off for this. 


Repository:
  rL LLVM

https://reviews.llvm.org/D52555





More information about the llvm-commits mailing list