[PATCH] D29541: [DAGCombiner] Leverage add's commutativity

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 4 15:37:47 PST 2017

deadalnix added inline comments.

Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1795
+SDValue DAGCombiner::visitADDLike(SDValue N0, SDValue N1, SDNode *LocReference) {
+  EVT VT = N0.getValueType();
RKSimon wrote:
> Why not replace SDNode *LocReference by const SDLoc &DL?
I followed the pattern that is used for other visitFOOLike . Also having the node available maybe come up handy if other information are required in the future. I was some factorization could be done between this and visitADDC.


More information about the llvm-commits mailing list