[PATCH] D13979: Introduction of FeatureX87

Bruno Cardoso Lopes via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 10:05:40 PST 2015


bruno added a subscriber: bruno.
bruno added a comment.

Hi Andrey,


================
Comment at: lib/Target/X86/X86Subtarget.h:406
@@ -401,3 +405,3 @@
   bool isSLM() const { return X86ProcFamily == IntelSLM; }
-  bool useSoftFloat() const { return UseSoftFloat; }
+  bool useSoftFloat() const { return UseSoftFloat || (!hasX87() && !hasSSE2()); }
 
----------------
This looks odd since we do support f32 (not f64) with SSE1. See X86ISelLowering.cpp:553

} else if (!Subtarget->useSoftFloat() && X86ScalarSSEf32) {
    // Use SSE for f32, x87 for f64.
    // Set up the FP register classes.
    addRegisterClass(MVT::f32, &X86::FR32RegClass);
    addRegisterClass(MVT::f64, &X86::RFP64RegClass);
...

Since not having SSE at all fallbacks to x87, why not only check for "UseSoftFloat ||  !hasX87())" ? Anyway, I think those should come in a separate patch with appropriate feature testcases. 


http://reviews.llvm.org/D13979





More information about the llvm-commits mailing list