[PATCH] D82474: [VectorCombine] try to form vector compare and binop to eliminate scalar ops

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 13:59:15 PDT 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:198
 
-  if (Ext0Index == Ext1Index) {
-    // If the extract indexes are identical, no shuffle is needed.
-    ConvertToShuffle = nullptr;
-  } else {
+  ConvertToShuffle = getShuffleExtract(Ext0, Ext1, PreferredExtractIndex);
+  if (ConvertToShuffle) {
----------------
Looks like some of this should be a preparatory NFC cleanup


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:599
+  Value *NewExt = Builder.CreateExtractElement(VecLogic, CheapIndex);
+  replaceValue(I, *NewExt);
+  return true;
----------------
`++SomeNewStatistic;`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82474/new/

https://reviews.llvm.org/D82474





More information about the llvm-commits mailing list