Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree-optimization/110979 - fold-left reduction and partial vectors
When we vectorize fold-left reductions with partial vectors but no target operation available we use a vector conditional to force excess elements to zero. But that doesn't correctly preserve the sign of zero. The following patch disables partial vector support when we have to do that and also need to honor rounding modes other than round-to-nearest. When round-to-nearest is in effect and we have to preserve the sign of zero instead use negative zero for the excess elements. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/110979 * tree-vect-loop.cc (vectorizable_reduction): For FOLD_LEFT_REDUCTION without target support make sure we don't need to honor signed zeros and sign dependent rounding. * gcc.dg/torture/pr110979.c: New testcase.
- Loading branch information