[PATCH] D90113: [DAGCombiner] Fold BinOp into Select containing identity constant

Layton Kifer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 21:16:02 PDT 2020


laytonio marked 2 inline comments as done.
laytonio added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:536
     SDValue foldVSelectOfConstants(SDNode *N);
-    SDValue foldBinOpIntoSelect(SDNode *BO);
+    SDValue foldBinOpIntoSelect(SDNode *BO, APInt *IdentityInt = nullptr,
+                                bool RHSIdentityOnly = false);
----------------
foad wrote:
> Maybe pass IdentityInt in as an Optional<int64_t> to simplify all the callers?
I don't think there would be a good way to handle ISD::AND with AllOnes with a int64_t


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

https://reviews.llvm.org/D90113



More information about the llvm-commits mailing list