[PATCH] D102893: [RISCV] Optimize xor/or with immediate in the zbs extension

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 19:34:55 PDT 2021


craig.topper added a comment.

In D102893#2772692 <https://reviews.llvm.org/D102893#2772692>, @jrtc27 wrote:

> Given how messy this is becoming and the amount of duplicated code for what are very similar patterns, does this not just want to be custom lowering? TableGen is starting to feel like the wrong tool for this.
>
> Also, just a side thought: how does all this interact with using the integers for things like load or store offsets? Do we end up not being able to fold an immediate into the load/store as a result of some of these optimisations and thus lose out overall on large-offset addressing when B is enabled?

I’m not sure custom lowering is the right tool either. Making OR/XOR Custom will likely have other effects. Maybe custom isel in RISCVISelDAGToDAG?

These are immediates being used only by an OR/XOR so I don’t think it affects loads/stores folding. Am I missing something?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102893



More information about the llvm-commits mailing list