[PATCH] D76500: WIP: GlobalISel: Lower funnel shifts

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 11:27:29 PST 2020


arsenm added a comment.

In D76500#2371797 <https://reviews.llvm.org/D76500#2371797>, @aemerson wrote:

> In D76500#2301324 <https://reviews.llvm.org/D76500#2301324>, @arsenm wrote:
>
>> In D76500#2301319 <https://reviews.llvm.org/D76500#2301319>, @aemerson wrote:
>>
>>> Is this still being worked on?
>>
>> Yes, I have an updated version I haven't posted yet. The problem I ended up blocked on was the fact that we don't have the divide-by-constant optimizations, combined with 128-bit division legalization not working
>
> Anything we can help on? For the divide by constant opts, I guess this is: X / C -> ashr X, log2(C)? Anything else?

It's a urem here, I think this was the important one:

  // fold (urem x, pow2) -> (and x, pow2-1)
  
  // fold (urem x, (shl pow2, y)) -> (and x, (add (shl pow2, y), -1))


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

https://reviews.llvm.org/D76500



More information about the llvm-commits mailing list