[PATCH] D33137: [DAGCombiner] use narrow vector ops to eliminate concat/extract (PR32790)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 13:25:36 PDT 2017


spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14462
+  if (!ExtractIndex)
+    return SDValue();
+
----------------
RKSimon wrote:
> visitEXTRACT_SUBVECTOR is doing quite a bit of similar stuff already (constant index, peeling through bitcasts of the source vector, etc.) is it worth reusing some of that?
Yes, there's some refactoring potential here. Now that I'm looking at the problems revealed by those peekThroughBitcast() cases, I strongly suspect that I'm going to be making another change here in the near future. Ok, if I add a TODO for this patch, and then I'll try to get this to be a bit cleaner?


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14516
+  if (!ConcatL && !ConcatR)
+    return SDValue();
+
----------------
RKSimon wrote:
> x86 has a tendency to convert to concat_vector to chains of insert_subvectors quite early - have you noticed if we're missing anything because of this?
Honestly, I haven't looked at more than PR32790 and the tests that changed here. But I assume you're right, so there's probably more to come. :)


https://reviews.llvm.org/D33137





More information about the llvm-commits mailing list