https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123755

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #4)
> That patch seems to have caused notable code quality regressions on riscv64.
> 
> unix/-march=rv64gc_zba_zbb_zbs_zicond: gcc:
> gcc.target/riscv/rvv/autovec/reduc/reduc_call-5.c -ftree-vectorize -O2
> -mrvv-max-lmul=dynamic  scan-assembler-times
> vfredosum\\.vs\\s+v[0-9]+,v[0-9]+,v[0-9]+ 1
> 
> Before the referenced change:

But FMA can trap in some cases. So I suspect the new code is correct and the
old code was not taking that into account and doing a conditional fma based on
the active elements (lanes) from the load mask.

Of course adding -fno-trapping-math will most likely get back to the original
code generation there.

Reply via email to