[PATCH] D68857: [X86] Add strict fp support for operations of X87 instructions

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 20:31:02 PDT 2019


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:601
+
+    // Handle constrained floating-point operations of scalar.
+    for (auto VT : { MVT::f32, MVT::f64, MVT::f80 }) {
----------------
Doesn't this stop working if sse1 is enabled? By we still need x87 for f64/f80.


================
Comment at: llvm/lib/Target/X86/X86InstrFPStack.td:372
 let SchedRW = [WriteMicrocoded] in {
-defm SIN : FPUnary<fsin, MRM_FE, "fsin">;
-defm COS : FPUnary<fcos, MRM_FF, "fcos">;
+defm SIN : FPUnary<any_fsin, MRM_FE, "fsin">;
+defm COS : FPUnary<any_fcos, MRM_FF, "fcos">;
----------------
SIN/COS are not mentioned in the X86ISelLowering code you added.


================
Comment at: llvm/test/CodeGen/X86/x87-fp-strict-sub.ll:84
+
+!0 = !{!1, !1, i64 0}
+!1 = !{!"float", !2, i64 0}
----------------
Is all this metadata needed?


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

https://reviews.llvm.org/D68857





More information about the llvm-commits mailing list