[PATCH] D13979: Introduction of FeatureX87
    Bruno Cardoso Lopes via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Dec 14 09:55:52 PST 2015
    
    
  
bruno added a comment.
Hi Andrey,
================
Comment at: lib/Target/X86/X86Subtarget.h:403
@@ -398,3 +402,3 @@
   bool isSLM() const { return X86ProcFamily == IntelSLM; }
-  bool useSoftFloat() const { return UseSoftFloat; }
+  bool useSoftFloat() const { return UseSoftFloat || !hasX87(); }
 
----------------
As Eric mentioned, better to live the option check alone: "bool useSoftFloat() const { return UseSoftFloat }". Then change X86ISelLowering.cpp:589 this way:
Change
  } else if (!Subtarget->useSoftFloat()) {
To
  } else if (!Subtarget->useSoftFloat() && Subtarget->hasX87()) {
This should be enough to get the behaviour you want.
================
Comment at: test/CodeGen/X86/x87.ll:6
@@ +5,3 @@
+
+define float @foo(float %a, float %b) nounwind readnone {
+entry:
----------------
This is missing appropriate checks for instructions you want (or not) to be present in the output.
http://reviews.llvm.org/D13979
    
    
More information about the llvm-commits
mailing list