Closed mppf closed 5 years ago
The zipper test works now https://github.com/cdl-saarland/rv/commit/0725e5e22d8129e3fa984147cae80651e34ff52c .. by not vectorizing. As of this writing, RV can not handle reduction SCCs (value reductions) that have users inside the loop.
@simoll - is this pattern hard enough for RV to support that the Chapel front end should avoid hinting the loop as vectorizeable with rv.vectorize.enable?
@mppf - it is possible to vectorize this (leave the phi scalar, use prefix sum to build the vector for in-loop users, reduce to scalar in the loop latch). This is just not implemented yet. Given that the hint doesn't do any harm, i see no reason to remove it. RV will vectorize the loop once this pattern is supported.
@simoll - OK, thanks. I'll close this issue since your fix is working for me & there's no further action required on the Chapel front-end side.
RV integration causes correctness failures for test/distributions/robust/arithmetic/basics/test_zipper_range.chpl
Here is a small reproducer:
Compile it (after PR #11779 and after
cd third-party/llvm && ./update-llvm.sh master && cd ../.. && make
) withThe expected output for this program is
but on my system, the RV-optimized version emits
I think there is a problem with the initial value for the vectorized version of the loop variable representing the index in
1.. by 2
.