[PATCH] D39575: [X86] Add subtarget features prefer-avx256 and prefer-avx128 and use them to limit vector width presented by TTI

David Kreitzer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 07:00:24 PDT 2017


DavidKreitzer added a comment.

This looks reasonable to me, Craig. For testing, the obvious thing would be to test the effect on the LoopVectorizer, since it is the primary consumer of this information.



================
Comment at: lib/Target/X86/X86Subtarget.h:64
+  enum X86PreferVecWidthEnum {
+    // NOTE: Strictest constraint must have highest encoding.
+    PreferAny, Prefer256, Prefer128
----------------
It might be worth expanding upon this a bit to make is clear why Prefer128 is "stricter" than Prefer256.

I have no objection to this choice of ordering, but it does make the code at lines 535-539 read a little funny.


https://reviews.llvm.org/D39575





More information about the llvm-commits mailing list