[PATCH] D147368: [LoongArch] Optimize bitwise and with immediates

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 21:55:02 PDT 2023


benshi001 added inline comments.


================
Comment at: llvm/test/CodeGen/LoongArch/ir-instruction/and.ll:369
 ; LA64:       # %bb.0:
 ; LA64-NEXT:    addi.w $a1, $zero, -31
 ; LA64-NEXT:    and $a0, $a0, $a1
----------------
benshi001 wrote:
> This is not optimized, since the value `-31` can be composed by a single `ADDI.W`.
This is not optimized, since the value `-2048` can be composed by a single `ADDI.W`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147368



More information about the llvm-commits mailing list