[PATCH] D73575: [InstCombine] canonicalize splat shuffle after cmp

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 13:35:02 PST 2020


spatel added a comment.

In D73575#1845464 <https://reviews.llvm.org/D73575#1845464>, @nikic wrote:

> LGTM
>
> Does it make sense to extend this for arbitrary shuffles in the future? The mask construction logic in https://github.com/llvm/llvm-project/blob/4aa8cdfeebec115b928e0ccb452551b520d00f0b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L1612-L1660 can probably mostly be reused for the icmp case.


Yes, I was debating if it was worth lifting that code or going for this more direct approach for splats-only. Based on the vector code that I've looked at so far, the splat case is by far the common case. I'll add a TODO here though in case we want to revisit that choice.


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

https://reviews.llvm.org/D73575





More information about the llvm-commits mailing list