[llvm] [RISCV] Only calculate ordered reduction with FloatingPoint type. NFC (PR #114180)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 08:01:10 PDT 2024


preames wrote:

> Without the check querying the `getArithmeticReductionCost()` by `reduce.add` `reduce.and` ... integer reductions without `reassoc` flag will fall into it. And it will return the cost of the floating point ordered reduction.

Which caller is this coming from?  getTypeBasedIntrinsicInstrCost (the one used by CostAnalysis printer pass), appears to pass nullopt for everything except fadd/fmul.  

https://github.com/llvm/llvm-project/pull/114180


More information about the llvm-commits mailing list