[PATCH] D32916: [DAGCombine] (addcarry 0, 0, X) -> (ext/trunc X)
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 01:24:07 PDT 2017
deadalnix added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2151
+ SDValue CarryExt = DAG.getBoolExtOrTrunc(CarryIn, DL, VT, CarryVT);
+ AddToWorklist(CarryExt.getNode());
+ return CombineTo(N, DAG.getNode(ISD::AND, DL, VT, CarryExt,
----------------
RKSimon wrote:
> spatel wrote:
> > Do you need to explicitly add to worklist? I thought this gets handled automatically by the combiner.
> Yes, this should be kept.
You need to add when you aren't returning the node for replacement, which is the case here.
https://reviews.llvm.org/D32916
More information about the llvm-commits
mailing list