[PATCH] D108324: [RISCV] Reduce duplicate code for calling SimplifyDemandedBits.

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 01:19:21 PDT 2021


luismarques accepted this revision.
luismarques added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:5974
+  // Caller should return SDValue(N, 0) if this returns true.
+  auto SimplifyDemandedLowBitsHelper = [&](unsigned OpNo, unsigned LowBits) {
+    SDValue Op = N->getOperand(OpNo);
----------------
Nit: it's not really important, and to some extent a matter of style, but things like "Helper" aren't very semantically descriptive. IMO it's best to, when possible, say instead in what way it's helping, e.g. `SimplifyOpDemandedLowBits`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108324



More information about the llvm-commits mailing list