[PATCH] D35722: [DAGCombine] Improve (sra (sra x, c1), c2) -> (sra x, (add c1, c2)) folding

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 13:06:28 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D35722#1203007, @RKSimon wrote:

> In https://reviews.llvm.org/D35722#1202997, @spatel wrote:
>
> > LGTM. I notice we don't fold the non-splat case of this pattern in IR. Do you think it's worth adding there too, or backend is good enough?
>
>
> Add it if you can, properly supporting vectors is always a good idea ;-)
>
> Is there the equivalent logical shifts -> zero combine?


AFAIK, no. I think splats are well supported now in instcombine, but we haven't generalized many transforms for non-splats.


Repository:
  rL LLVM

https://reviews.llvm.org/D35722





More information about the llvm-commits mailing list