[PATCH] D13979: Introduction of FeatureX87

Andrey Turetskiy via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 08:24:45 PST 2016


aturetsk added inline comments.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:527
@@ -525,3 +526,3 @@
 
-  if (!Subtarget.useSoftFloat() && X86ScalarSSEf64) {
+  if (UseX87 && X86ScalarSSEf64) {
     // f32 and f64 use SSE.
----------------
I get X87 load and store instructions in x87.ll if I don't check hasX87 here. I think changing that would require significant efforts. Since we don't have a CPU which has -x87 but +sse2, I just left the check here.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:561
@@ -559,3 +560,3 @@
     addLegalFPImmediate(APFloat(+0.0f)); // xorps
-  } else if (!Subtarget.useSoftFloat() && X86ScalarSSEf32) {
+  } else if (UseX87 && X86ScalarSSEf32) {
     // Use SSE for f32, x87 for f64.
----------------
Done.

================
Comment at: test/CodeGen/X86/x87.ll:8
@@ +7,3 @@
+; RUN: llc < %s -march=x86 -mattr=-x87,+sse2 | FileCheck %s -check-prefix=NOX87 --implicit-check-not "{{ }}f{{.*}}"
+; RUN: llc < %s -march=x86-64 -mattr=-x87,+sse2 | FileCheck %s -check-prefix=NOX87 --implicit-check-not "{{ }}f{{.*}}"
+
----------------
Done.


http://reviews.llvm.org/D13979





More information about the llvm-commits mailing list