[PATCH] D47546: [X86][SSE] Use multiplication scale factors for v8i16 SHL on pre-AVX2 targets.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 5 07:19:49 PDT 2018


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

LGTM - see inline for a couple of potential code comment clarifications.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:23241
   }
 
   if (VT == MVT::v4i32) {
----------------
A comment around here or maybe as a function comment to describe the transforms would be good.
  // If the target doesn't support variable shifts, use either FP conversion 
  // or integer multiplication to avoid shifting each element individually.
?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:23250
 
+  if (VT == MVT::v8i16 && !Subtarget.hasAVX2()) {
+    SDValue Z = getZeroVector(VT, Subtarget, DAG, dl);
----------------
Add a note about why AVX2 doesn't want this?


Repository:
  rL LLVM

https://reviews.llvm.org/D47546





More information about the llvm-commits mailing list