[PATCH] D88834: [InstCombine] matchRotate - add support for matching general funnel shifts with constant shift amounts (PR46896)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 15:02:48 PDT 2020
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2107-2108
+ // For non-constant cases, the following patterns currently only support
+ // rotation patterns.
+ if (ShVal0 != ShVal1)
----------------
RKSimon wrote:
> spatel wrote:
> > Sorry - it's still not clear to me *why* we have this clause. Are we regressing something without this restriction, or is the expanded IR pattern with a variable shift amount different between general funnel vs. rotate?
> The fold doesn't work for general funnel shifts: https://alive2.llvm.org/ce/z/L6YpuX
Ah, I was looking at some of the unchanged regression tests similar to:
https://alive2.llvm.org/ce/z/wM5Xt4
...so I didn't make the connection that this is a different pattern. Do we want to add a 'TODO' then to get the alternate pattern(s) that do correspond to general funnel with variable shift op?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88834/new/
https://reviews.llvm.org/D88834
More information about the llvm-commits
mailing list