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

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 10:41:01 PDT 2023


goldstein.w.n created this revision.
goldstein.w.n added reviewers: RKSimon, pengfei, nikic, arsenm, efriedma.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Do so by extending `matchUnaryPredicate` to also work for
`ConstantFPSDNode` types then encapsulate the constant checks in a
lambda and pass it to `matchUnaryPredicate`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154868

Files:
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/X86/fold-int-pow2-with-fmul-or-fdiv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154868.538734.patch
Type: text/x-patch
Size: 9545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230710/50bbb2ad/attachment.bin>


More information about the llvm-commits mailing list