[PATCH] D99042: [RISCV] Teach targetShrinkDemandedConstant to preserve (and X, 0xffffffff).

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 10:15:59 PDT 2021


craig.topper added a comment.

In D99042#2641799 <https://reviews.llvm.org/D99042#2641799>, @frasercrmck wrote:

> Are there situations in which preserving the `and` benefits codegen, aside from allowing us to remove the SRLIWPat?

https://godbolt.org/z/GnsMvavrv though arguably from that example we should be preserving any trailing 1s mask and teach isel to use SLLI+SRLI for any trailing mask not just 0xffffffff.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99042



More information about the llvm-commits mailing list