[PATCH] D67128: [X86] Move x86_64 fp128 conversion to libcalls from type legalization to DAG legalization

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 14:59:51 PDT 2019


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:666
+                                                   : &X86::VR128RegClass);
+    setOperationAction(ISD::FADD, MVT::f128, Custom);
+    setOperationAction(ISD::FSUB, MVT::f128, Custom);
----------------
I suspect we can use Expand here and let LegalizeDAG form libcalls for FADD/FSUB/FMUL/FDIV, but what I have here is what AArch64 does. I think LegalizeDAG didn't handle those operations for libcalls at the time the AArch64 code was written. I went conservative for X86 here because LegalizeDAG can form tail calls to the library which legalize types didn't do and my custom handler doesn't either. This avoided some test divergences.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67128/new/

https://reviews.llvm.org/D67128





More information about the llvm-commits mailing list