[PATCH] D134982: [X86] Add support for "light" AVX
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 02:45:21 PST 2022
RKSimon added a comment.
Sorry I missed your previous message - yes this is the kind of tuning attribute I had in mind instead of a generic flag, although I think it needs to be tightened to be more specific (256-bit ops).
================
Comment at: llvm/lib/Target/X86/X86.td:619
+def TuningAllowLightAVX
+ : SubtargetFeature<"allow-light-avx", "AllowLightAVX", "true",
+ "Enable generation of 256 AVX load/stores even if we prefer 128-bit">;
----------------
Maybe rename this "allow-light-256-bit"?
================
Comment at: llvm/lib/Target/X86/X86Subtarget.h:259
+ bool useLightAVX() const {
+ return AllowLightAVX;
+ }
----------------
Depending on how prevalent this will be used, we might adjust it so people don't need to remember to check Subtarget.getPreferVectorWidth() >= 256 as well:
```
bool useLightAVX256Instructions() const {
return Subtarget.getPreferVectorWidth() >= 256 || AllowLightAVX;
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134982/new/
https://reviews.llvm.org/D134982
More information about the llvm-commits
mailing list