[PATCH] D60545: [DAGCombiner] narrow shuffle of concatenated vectors

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 10:46:46 PDT 2019


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17640
+
+  // shuffle (concat X, undef), (concat Y, undef), Mask -->
+  // concat (shuffle X, Y, Mask0), (shuffle X, Y, Mask1)
----------------
sdesmalen wrote:
> Would it be possible to move/copy this comment to the call of foldShuffleOfConcatUndefs ?
I can do that if you think that makes the code clearer, but in general I try to make the function's doxygen comment a bit more vague in case the implementation changes/grows, but not repeat that function-level comment at the callers.

For example, I think this function could be extended to handle a pattern where the 2nd operand is not an undef value as long as the shuffle mask is not choosing elements from that 2nd operand.

Let me know if I am misunderstanding the suggestion.


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

https://reviews.llvm.org/D60545





More information about the llvm-commits mailing list