Hi All,
RFC in [1] proposed to perform loop vectorization in presence of multiple
exits. I could find some patches [2, 3] essential for this that got
upstreamed.
Is the implementation ready to be used now? If not, will this be landed in
the near future?
When I tried with simple examples like the one below, vectorization was not
happening.
int foo(float *a, int n){
int i;
for (i=0;i<n;i++){
if (a[i] == 0){
break;
}
}
return i;
}
[1] https://lists.llvm.org/pipermail/llvm-dev/2019-September/134998.html
[2] https://reviews.llvm.org/D66688
[3] https://reviews.llvm.org/D93317
Thanks and Regards,
------------------------------
Raghesh Aloor
AMD India Pvt. Ltd.
Bengaluru.
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20210614/9540a62b/attachment.html>
Hi All, Any update on this query? Regards, ------------------------------ Raghesh Aloor AMD India Pvt. Ltd. Bengaluru. ------------------------------ On Mon, Jun 14, 2021 at 8:19 AM raghesh <raghesh.a at gmail.com> wrote:> Hi All, > > RFC in [1] proposed to perform loop vectorization in presence of multiple > exits. I could find some patches [2, 3] essential for this that got > upstreamed. > > Is the implementation ready to be used now? If not, will this be landed in > the near future? > > When I tried with simple examples like the one below, vectorization was > not happening. > > int foo(float *a, int n){ > int i; > for (i=0;i<n;i++){ > if (a[i] == 0){ > break; > } > } > return i; > } > > [1] https://lists.llvm.org/pipermail/llvm-dev/2019-September/134998.html > [2] https://reviews.llvm.org/D66688 > [3] https://reviews.llvm.org/D93317 > > Thanks and Regards, > ------------------------------ > Raghesh Aloor > AMD India Pvt. Ltd. > Bengaluru. > ------------------------------ >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210616/72ba1d69/attachment.html>
Progress has been slow. At the moment, I'm still working on getting support for loops with multiple exits where all exits are analyzeable. (The example below includes a data dependent exit, that's a harder sub-problem.) Currently, the progress on analyzeable exits is blocked on https://reviews.llvm.org/D103700. Philip On 6/13/21 7:49 PM, raghesh via llvm-dev wrote:> Hi All, > > RFC in [1] proposed to perform loop vectorization in presence of > multiple exits. I could find some patches [2, 3] essential for this > that got upstreamed. > > Is the implementation ready to be used now? If not, will this be > landed in the near future? > > When I tried with simple examples like the one below, vectorization > was not happening. > > int foo(float *a, int n){ > int i; > for (i=0;i<n;i++){ > if (a[i] == 0){ > break; > } > } > return i; > } > > [1] > https://lists.llvm.org/pipermail/llvm-dev/2019-September/134998.html > <https://lists.llvm.org/pipermail/llvm-dev/2019-September/134998.html> > [2] https://reviews.llvm.org/D66688 <https://reviews.llvm.org/D66688> > [3] https://reviews.llvm.org/D93317 <https://reviews.llvm.org/D93317> > > Thanks and Regards, > ------------------------------ > Raghesh Aloor > AMD India Pvt. Ltd. > Bengaluru. > ------------------------------ > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210616/f937257f/attachment.html>