[PATCH] D37896: [DAGCombine] Resolving PR34474 by transforming mul(x, 2^c +/- 1) -> sub/add(shl(x, c) x) for any type including vector types
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 8 04:22:39 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2674
+ SDValue Const0 = DAG.getConstant(0, DL, VT);
+ SDValue &Multipliers = N1;
+ if (SignDirection < 0) {
----------------
Please don't use a reference on a SDValue like this, its makes the code a lot more confusing.
https://reviews.llvm.org/D37896
More information about the llvm-commits
mailing list