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

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 06:45:25 PDT 2022


SixWeining added a comment.

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.


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