[PATCH] D74495: [VectorCombine] try to form vector binop to eliminate an extract element

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 09:47:06 PST 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:135
+  }
+
+  // TODO: Handle C0 != C1 by shuffling 1 of the operands.
----------------
Thinking out loud: what about the case where `X == Y`?
* If the extract is of the same element, could consider doing extract from `2*X` or `X+X`
* If elements are different, could consider forming `hadd`


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

https://reviews.llvm.org/D74495





More information about the llvm-commits mailing list