[PATCH] D125712: [SLP][X86] Improve reordering to consider alternate instruction bundles
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 14:20:59 PDT 2022
RKSimon added a comment.
Don't we need to account for cost somehow?
================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:5331
+ return (NumElements == 4 && ST->hasSSE3()) ||
+ (NumElements == 8 && ST->hasAVX());
+ if (ElemTy->isDoubleTy())
----------------
The AVX case is unnecessary as any NumElements % 4 == 0 case will be supported as multiple ADDSUB ops.
================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:5334
+ return (NumElements == 2 && ST->hasSSE3()) ||
+ (NumElements == 4 && ST->hasAVX());
+ return false;
----------------
Same here NumElements % 2 == 0 is enough
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125712/new/
https://reviews.llvm.org/D125712
More information about the llvm-commits
mailing list