[PATCH] D88201: [DAGCombiner] Add decomposition patterns for Mul-by-Imm.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 03:38:26 PDT 2020
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3647
+ unsigned TZeros = MulC == 2 ? 0 : MulC.countTrailingZeros();
+ MulC = MulC.lshr(TZeros);
if ((MulC - 1).isPowerOf2())
----------------
MulC.lshrInPlace(TZeros);
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:15944
+ if (ConstNode->getAPIntValue().getBitWidth() > 8 * sizeof(int64_t))
+ return false;
+ // This transformation will generate >= 2 operations. But the following
----------------
Maybe better to use ConstNode->getAPIntValue().isSignedIntN() ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88201/new/
https://reviews.llvm.org/D88201
More information about the llvm-commits
mailing list