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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 10:38:00 PST 2019


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with a couple of minors



================
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), ...
----------------
You should be able to add RSQRTSS + RCPSS as well?


================
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
----------------
Slightly annoying - the vector version broadcasts a scalar, the scalar version loads a whole vector..... Can you raise a bug on this please?


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

https://reviews.llvm.org/D58282





More information about the llvm-commits mailing list