Fix PR 17368: disable unnecessary vector multiplication distribution for square of add/sub on ARM

Renato Golin renato.golin at linaro.org
Wed Sep 25 14:08:12 PDT 2013


Hi Weiming,

Patch looks great. Simple  and effective.

Do you really need the extra shuffles before add/multi in the text?

Otherwise, Looks good to me.

Cheers,
Renato
On 25 Sep 2013 21:27, "Weiming Zhao" <weimingz at codeaurora.org> wrote:

> Hi,****
>
> ** **
>
>     Generally, it is desirable to transform ā€œ(a + b) * cā€ to ā€œa*c + b*cā€
> for****
>
> ARM with VMLx Forwarding, where a, b and c are vectors.****
>
> ** **
>
>     However, for (a + b)*(a + b), distribution will result in one extra***
> *
>
>     instruction.****
>
>     With distribution:****
>
>        x = a + b (vadd)****
>
>        y = a * x (vmul)****
>
>        z = y + b * y (vmla)****
>
>     ****
>
>     Without distribution:****
>
>        x = a + b (vadd)****
>
>        z = x * x (vmul)****
>
>     ****
>
>     This patch detects if a mul is a square of add/sub. If yes, skip****
>
>     distribution.****
>
> ** **
>
> Please help to review the patch****
>
> ** **
>
> Thanks,****
>
> Weiming****
>
> ** **
>
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation****
>
> ** **
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130925/bb2651c4/attachment.html>


More information about the llvm-commits mailing list