RFC: Modeling horizontal vector reductions

Chandler Carruth chandlerc at google.com
Wed Sep 11 15:30:33 PDT 2013


On Wed, Sep 11, 2013 at 3:17 PM, Arnold Schwaighofer <
aschwaighofer at apple.com> wrote:

> Therefore, I would like to model horizontal reductions as either versions
> depending on which is deemed cheaper by the cost model.
>

What would make the first pattern cheaper? I'd like to better understand
why we don't just all ways do the second form...


>
> It is a bit unfortunate to not have one canonical form but I don’t think
> this justifies adding fast-math flags to isel (which will eventually go
> away).
>

I don't really understand this part.

We have some reason at the IR level to know that we can choose either
association and get equivalent results. Why isn't the correct answer to
pick a canonical form, but preserve that information long enough to
reassociate when it is needed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130911/fcbdf719/attachment.html>


More information about the llvm-commits mailing list