[PATCH] D90247: [AArch64] Add legalizations for VECREDUCE_SEQ_FADD
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 27 10:29:29 PDT 2020
nikic added a comment.
> A good example of this can be seen in @test_v3f32 from vecreduce-fadd-legalization-strict.ll. Here we end up with 4 FADDs, instead of the 3 FADDs required. The newly added FADD is the result of widening the illegal v3f32 vector type to v4f32, where the newly added element in the reduction is the "neutral" value, 0.0.
Looking at https://github.com/llvm/llvm-project/blob/5a3ef55a524bf9e072d98286e5febdb218b1fc72/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L7477-L7480, shouldn't this just be a matter of using `-0.0` as the neutral element instead? If `0.0` is not actually neutral here, then this is not just suboptimal, it's incorrect. (We should fix this for the non-sequential case as well.)
> And I'm still missing legalization support for some other actions, like SoftenFloat and PromoteFloat. I did not find existing tests for those actions.
Copying llvm/test/CodeGen/ARM/vecreduce-fadd-legalization-soft-float.ll without the `fast` fmf should work as test coverage for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90247/new/
https://reviews.llvm.org/D90247
More information about the llvm-commits
mailing list