[PATCH] D154868: [DAGCombiner] Extend `combineFMulOrFDivWithIntPow2` to work for non-splat float vecs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 11:14:10 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:3128
   bool matchUnaryPredicate(SDValue Op,
-                           std::function<bool(ConstantSDNode *)> Match,
+                           std::variant<std::function<bool(ConstantSDNode *)>,
+                                        std::function<bool(ConstantFPSDNode *)>>
----------------
I've never understood why ConstantSDNode isn't a common base to a ConstantInt and ConstantFPNode

I think you'd be better off just making this SDNode* and letting the implementation dyn_cast 


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