[PATCH] D134706: [AArch64] Lower multiplication by a constant int to shl+sub+shl

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 18:29:35 PDT 2022


Allen marked 2 inline comments as done.
Allen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14830
 
+  auto Shl = [&](auto N0, auto N1) {
+    return DAG.getNode(ISD::SHL, DL, VT, N0, N1);
----------------
efriedma wrote:
> Since the shift amount is always a constant here, might as well put the call to DAG.getConstant() inside the Shl lambda.
> 
> LLVM coding guidelines say you should avoid using "auto" when it's easy to spell out the type.
Done, thanks for your suggestion


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

https://reviews.llvm.org/D134706



More information about the llvm-commits mailing list