[PATCH] D40282: [X86] Don't report gather is legal on Skylake CPUs when AVX2/AVX512 is disabled. Allow gather on SKX/CNL/ICL when AVX512 is disabled by using AVX2 instructions.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 25 08:56:23 PST 2017


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

LGTM with a couple of minors about comment cleanup



================
Comment at: lib/Target/X86/X86Subtarget.cpp:279
   // parameter is used for cost estimation of Gather Op and comparison with
   // other alternatives.
+  if (hasAVX512() || (hasAVX2() && hasFastGather()))
----------------
Does this comment need cleaning up, possibly moving some it to the FeatureHasFastGather def?


================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:2521
 
   // AVX-512 and Skylake AVX2 allows gather and scatter
+  return (DataWidth == 32 || DataWidth == 64) &&
----------------
Drop skylake reference and add a TODO about dropping hasAVX512() and driving this purely by hasFastGather


https://reviews.llvm.org/D40282





More information about the llvm-commits mailing list