[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:47:48 PDT 2024


preames wrote:

Mostly summarizing my investigation for future reference.

The way this works for the current reduce.* intrinsics is that BasicTTI dispatches these to getArithmeticReductionCost and getMinMaxReductionCost respective.  BasicTTI distinguishes fadd/fmul from the other arithmetic, and specifically passes None for the FMF on non-FP arithmetics.  It does pass the FMF to the MinMax variant, but since there are no ordered min/max variants, that doesn't apply.  

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


More information about the llvm-commits mailing list