[PATCH] D88201: [DAGCombiner] Add decomposition patterns for Mul-by-Imm.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 06:53:39 PDT 2020
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3602-3604
if (isConstantOrConstantVector(N1, /*NoOpaques*/ true) &&
DAG.isKnownToBeAPowerOfTwo(N1) &&
(!VT.isVector() || Level <= AfterLegalizeVectorOps)) {
----------------
spatel wrote:
> Independent of this patch, but if you are looking at making further changes in here...that looks strange/unnecessary. The other transforms around here are using `N1IsConst`; why is this one different?
I think because this one has been updated to support non-uniform vectors but most of others haven't, or only match scalars or uniform/splat vectors.
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