[PATCH] D128191: [LoongArch] Combine ((x & shifted_mask) >> shamt) to bstrpick.{w/d}

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 06:58:07 PDT 2022


xen0n added a comment.

In D128191#3596468 <https://reviews.llvm.org/D128191#3596468>, @SixWeining wrote:

> In D128191#3596399 <https://reviews.llvm.org/D128191#3596399>, @xen0n wrote:
>
>> Nice overall improvements, thanks!
>>
>> Only one minor suggestion. Do you think an extra test case that verifies something like `(x & 0xfff0) >> 17` are properly optimized to `0`? Or is such an optimization already covered by all the generic mechanisms so it's not needed here?
>
> Yes, I have meant to write such a negative test but I find it have already been optimized to `0`. So I think we don’t need it here.

I guessed so. So this is fine, and I've approved. We may wait for a couple of days for others to take a look at this though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128191



More information about the llvm-commits mailing list