Do so by extending matchUnaryPredicate to also work for
ConstantFPSDNode types then encapsulate the constant checks in a
lambda and pass it to matchUnaryPredicate.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/include/llvm/CodeGen/SelectionDAGNodes.h | ||
---|---|---|
3125–3126 | 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 |
llvm/include/llvm/CodeGen/SelectionDAGNodes.h | ||
---|---|---|
3131 | Why not just add a matchUnaryFpPredicate variant? |
llvm/include/llvm/CodeGen/SelectionDAGNodes.h | ||
---|---|---|
3131 | 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. |
an -> a