[PATCH] D11438: Fix x86_64 fp128 calling convention

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 10:02:40 PDT 2015


rnk added a comment.

I think you're cutting against the grain of how legalization is supposed to work. Then again, I'm not very familiar with how it's supposed to work. From looking at the code, I think you're supposed to add more calls to setOperationAction(...), rather than trying to say that the f128 type needs soft float handling. Does that make sense?


================
Comment at: include/llvm/Target/TargetLowering.h:1919
@@ -1918,2 +1918,3 @@
 
+protected:
   ValueTypeActionImpl ValueTypeActions;
----------------
I think ValueTypeActions should be private to TargetLowering.

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:54
@@ -53,1 +53,3 @@
 
+  // Some types, e.g. x86_64's f128, want to be legally in registers
+  // but need some operations converted to library calls or integer
----------------
If this is x86_64-specific, why is it in LegalizeFloatTypes.cpp?

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:77
@@ +76,3 @@
+      case ISD::ConstantFP:
+        goto SaveResult;
+    }
----------------
I'm not really sure what's up with this code, but adding goto doesn't feel particularly good.


http://reviews.llvm.org/D11438





More information about the llvm-commits mailing list