[llvm] r222142 - [Reassociate] As the expression tree is rewritten make sure the operands are

Chad Rosier mcrosier at codeaurora.org
Tue Nov 18 11:12:27 PST 2014


Thanks for the info, Suyong.  I'm pretty sure the change is trivially
correct.  It's very likely this commit perturbed a lot of IR.  Prior to my
recent commits the IR that was coming out of the pass was largely
unordered.

 Chad

> Hi Chad, Timur
>
> Just wanted to make a point here.
>
> This patch actually eased further transformations like SLP Vectoization.
>
> Test case :
>
> sum = a[0] + a[1] + a[2] + a[3]
>
> Earlier, without this patch, re-associate pass would re-organize this
> expression into
>
> sum = (((a[1] + a[0]) + a[2]) + a[3])
>
> which made SLP vectorizer difficult to identify this type of horizontal
> reduction.
> With this patch, the expression would remain
>
> sum = (((a[0] + a[1]) + a[2]) + a[3])
>
> which made SLP vectorizer task simpler.
>
> Patch holds good value for further optimization passes,
> though as Timur reports that its breaking some test cases.
>
> --
> With regards,
> Suyog Sarda
>





More information about the llvm-commits mailing list