[PATCH] D122563: [RISCV] Add DAGCombine to fold base operation and reduction.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 13:38:31 PDT 2022


craig.topper added a comment.

In D122563#3469797 <https://reviews.llvm.org/D122563#3469797>, @fakepaper56 wrote:

> Since we need to transform `VECREDUCE` to `VP_REDUCE` before legalization for Fraser's method, we need to deal with illegal type of `VECREDUCE`. If we don't have idea to deal with illegal type nodes of `VECREDUCE`, how about we just use my original combine?

I'm fine with this patch. It makes the most sense with the way things currently are.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8454
+  case ISD::FADD:
+    return performFADDCombine(N, DAG);
+  case ISD::UMAX:
----------------
craig.topper wrote:
> craig.topper wrote:
> > Can we just lump all these together calling combineBinOpToReduce directly until we need specific combines for them?
> This wasn't addressed. I don't think we want individual performUMAXCombine, performUMINCombine, etc. functions.
Please address this comment and I will approve this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122563/new/

https://reviews.llvm.org/D122563



More information about the llvm-commits mailing list