Luke Lau 425d1aad29 [RISCV] Handle scalarized reductions in getArithmeticReductionCost
This fixes a crash reported at
https://github.com/llvm/llvm-project/pull/114250#issuecomment-2813686061

If the vector type isn't legal at all, e.g. bfloat with +zvfbfmin,
then the legalized type will be scalarized. So use getScalarType()
instead of getVectorElement() when checking for f16/bf16.

(cherry picked from commit 053451cb3502144564b4d0b30a9046045d1820d4)
2025-04-25 16:46:30 -07:00
..
2025-01-28 08:04:09 +01:00