[PATCH] D88834: [InstCombine] matchRotate - add support for matching general funnel shifts with constant shift amounts (PR46896)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 03:21:30 PDT 2020
RKSimon marked 3 inline comments as done.
RKSimon added inline comments.
================
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)
----------------
spatel wrote:
> 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?
@spatel I've updated D88783 so it works as a basic alternative pattern for non-constant funnel shift handling.
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