[PATCH] D100091: [X86] Fix wrong handle with "-mno-x87"

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 17 19:35:01 PST 2021


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:2737-2740
+      // When returning a value via  an X87 register, report an error if X87 is
+      // disabled.
+      if (!Subtarget.hasX87())
+        report_fatal_error("x87 register return with x87 disabled");
----------------
We don't need it after D112143.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:3248-3249
 
+  if (ValVT == MVT::f80 && !Subtarget.hasX87())
+    report_fatal_error("x87 register return with x87 disabled");
+
----------------
ditto.


================
Comment at: llvm/test/CodeGen/X86/nox87-error.ll:1
+; RUN: not --crash llc < %s -mattr=-x87 -o /dev/null 2>&1 | FileCheck %s --check-prefix NOX87
+; RUN: llc < %s | FileCheck %s
----------------
ditto.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100091



More information about the llvm-commits mailing list