[PATCH] D121354: [SLP] Fix lookahead operand reordering for splat loads.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 04:23:43 PST 2022


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1121
+      if (V1 == V2) {
+        if (isa<LoadInst>(V1) && NumLanes == 2)
+          return VLOperands::ScoreSplatLoads;
----------------
This should be a lot more principled than this (i.e, query the actual costmodel).
E.g., `movddup` is only for `double`, but i think this will also trigger for `float`?
Also, what about broadcasting loads that are available in AVX/AVX2/AVX512?


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