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

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 13 16:42:30 PDT 2021


jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:215
 
+def AddShlShl_1A : PatFrag<(ops node:$A, node:$B, node:$C, node:$D),
+                           (add (shl node:$A, node:$B),
----------------
This should just be a templated class that takes the +/- 1/2/3 as an argument rather than copy-pasting the same thing 6 times. Though the number of patterns and special cases for all the bitmanip stuff seems to be getting rather crazy; is there an end in sight?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109729



More information about the llvm-commits mailing list