[PATCH] D90113: [DAGCombiner] Fold BinOp into Select containing identity constant
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 07:00:31 PDT 2020
foad 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);
----------------
laytonio wrote:
> 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
I was thinking you'd pass in -1 for that case, which would be sign-extended whenever it gets converted to an APInt.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90113/new/
https://reviews.llvm.org/D90113
More information about the llvm-commits
mailing list