[PATCH] D31960: [InstSimplify] fold identity shuffles (recursing if needed)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 14:37:33 PDT 2017


spatel created this revision.
Herald added a subscriber: mcrosier.

Please have a hard look to make sure I haven't botched the shuffle mask logic...
This patch simplifies the examples from https://reviews.llvm.org/D31509 and https://reviews.llvm.org/D31927 (PR30630) and catches the basic identity shuffle tests that Zvi recently added.

I'm not sure if we have something like this in DAGCombiner, but we should?

It's worth noting that "MaxRecurse / RecursionLimit" is only 3 on entry at the moment. We might want to bump that up if there are longer shuffle chains like this in the wild.


https://reviews.llvm.org/D31960

Files:
  lib/Analysis/InstructionSimplify.cpp
  test/Transforms/InstSimplify/shufflevector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31960.94893.patch
Type: text/x-patch
Size: 9303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170411/28e76b29/attachment.bin>


More information about the llvm-commits mailing list