[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:49:06 PDT 2024
================
@@ -1552,7 +1552,7 @@ RISCVTTIImpl::getArithmeticReductionCost(unsigned Opcode, VectorType *Ty,
}
// IR Reduction is composed by two vmv and one rvv reduction instruction.
- if (TTI::requiresOrderedReduction(FMF)) {
+ if (TTI::requiresOrderedReduction(FMF) && ElementTy->isFloatingPointTy()) {
----------------
preames wrote:
I think a cleaner way to express this change is to simply sink the check for requiresOrderedReduction under the FADD case in the switch below. That's the only supported reduction kind with an ordered variant.
https://github.com/llvm/llvm-project/pull/114180
More information about the llvm-commits
mailing list