[PATCH] D154868: [DAGCombiner] Extend `combineFMulOrFDivWithIntPow2` to work for non-splat float vecs
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 10:00:02 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:3132
+ /// Same as above to with wrapper only accepting ConstantSDNode or nullptr.
+ inline bool matchUnaryPredicate(SDValue Op,
+ std::function<bool(ConstantSDNode *)> Match,
----------------
goldstein.w.n wrote:
> RKSimon wrote:
> > RKSimon wrote:
> > > Why not just add a matchUnaryFpPredicate variant?
> > I meant just copy the existing matchUnaryPredicate implementation - the template wrapper + matchUnaryPredicateAnyNode look over complicated tbh (and a similar amount of code to maintain as just copying the original).
> Really? Seems to me to be simpler to do node -> wrapper -> final. At this point adding any new constant type is just adding a new wrapper + adding isa type in anynode.
>
> Imo cleaner like this but if you feel strongly Ill change.
Yes please - as @arsenm mentioned, we'd be better off trying to add a ConstantSDBaseNode common class if we did need new constant node types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154868/new/
https://reviews.llvm.org/D154868
More information about the llvm-commits
mailing list