[PATCH] D66882: [DAGCombiner] Match (add X, X) as (shl X, 1) when detecting rotate.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 11:01:18 PDT 2019
lebedev.ri added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6120
// result matches up with the existing shift's LHS op.
if (IsMulOrDiv) {
// Op to extract from is a mul or udiv by a constant.
----------------
deadalnix wrote:
> lebedev.ri wrote:
> > Hm, this function already handles non-shifts.
> > Can it simply be extended with a similar block?
> The whole function is about reconstructing shifts from something else.
duh?
That is not what i was talking about.
This code already matches non-shifts - multiplications, divisions,
I'm wondering if it can be extended to also handle add's, without adding that explicit `return DAG.getNode(ISD::SHL, `
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66882/new/
https://reviews.llvm.org/D66882
More information about the llvm-commits
mailing list