[PATCH] D98963: [LoopVectorize] Change the identity element for FAdd

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 06:32:50 PDT 2021


dmgreen added a comment.

It would presumably need to be SROA that added flags to phi's it created? I'm not sure where it would get that info from though.

> Do we know why we're seeing the mixed zeros in the tests? Is it an artifact of the test (because the test includes a +0.0 to start with) that we don't see in practice?

I think most reductions will start out as

  float s = 0;
  for(int i = 0; i < n; i++)
    s += x[i];

I feel it would be unusual for a user to deliberately use -0.0 as the start value! 0 is always going to be the most common choice.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98963/new/

https://reviews.llvm.org/D98963



More information about the llvm-commits mailing list