[PATCH] D111117: [RISCV] Optimize (add (shl x, c0), c1)

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 18:22:03 PDT 2021


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6454
     return V;
-  // Fold (add (shl x, c0), (shl y, c1)) ->
-  //      (SLLI (SH*ADD x, y), c0), if c1-c0 equals to [1|2|3].
----------------
This comment also repeated before the definition of `transformAddShlImm`, and should also be dropped.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111117



More information about the llvm-commits mailing list