[PATCH] D58282: [x86] scalarize extract element 0 of FP math

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 11:36:41 PST 2019


spatel marked 4 inline comments as done.
spatel added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:34292
+  case ISD::FROUND:
+  case ISD::FFLOOR: {
+    // extract (fp X, Y, ...), 0 --> fp (extract X, 0), (extract Y, 0), ...
----------------
RKSimon wrote:
> You should be able to add RSQRTSS + RCPSS as well?
Yes - I'll add that to the TODO. There are other x86-specific opcodes like FMAX/FMAXC too, so I need to do a full audit.


================
Comment at: llvm/test/CodeGen/X86/extractelement-fp.ll:309
+; CHECK-NEXT:    vandps {{.*}}(%rip), %xmm1, %xmm1
+; CHECK-NEXT:    vandps {{.*}}(%rip), %xmm0, %xmm0
 ; CHECK-NEXT:    vorps %xmm1, %xmm0, %xmm0
----------------
RKSimon wrote:
> Slightly annoying - the vector version broadcasts a scalar, the scalar version loads a whole vector..... Can you raise a bug on this please?
https://bugs.llvm.org/show_bug.cgi?id=40905


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

https://reviews.llvm.org/D58282





More information about the llvm-commits mailing list