[PATCH] D121354: [SLP] Fix lookahead operand reordering for splat loads.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 06:56:38 PDT 2022
ABataev added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1057
+ VectorType *SubTp = nullptr,
+ bool IsLoad = false) const;
----------------
I belive better to pass the instruction here, just like in other functions. And then do the analysis of this instruction, if it was passed.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1130
+ // A broadcast of a load can be cheaper on some targets.
+ if (TTI->isLegalBroadcastLoad(V1->getType(), NumLanes))
+ return VLOperands::ScoreSplatLoads;
----------------
Probably, need to check also for number of uses + external uses.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121354/new/
https://reviews.llvm.org/D121354
More information about the llvm-commits
mailing list