[PATCH] D57921: [DAG] Cleanup unused node in SimplifySelectCC.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 12:48:18 PST 2019


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18677
   SDValue SCC = SimplifySetCC(getSetCCResultType(CmpOpVT), N0, N1, CC, DL,
                               false);
+  if (SCC.getNode()) {
----------------
RKSimon wrote:
> Could we replace this with a call to SelectionDAG::FoldSetCC()? That should only ever constant fold which AFAICT is what we're after.
Actually it looks like there's a tiny bit of commutation code (moves single constant to RHS) that probably needs pulling out of FoldSetCC into getNode - but that's trivial compared to the TLI.SimplifySetCC monster.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57921/new/

https://reviews.llvm.org/D57921





More information about the llvm-commits mailing list