diff options
| author | Weiming Zhao <weimingz@codeaurora.org> | 2013-09-25 23:12:06 +0000 |
|---|---|---|
| committer | Weiming Zhao <weimingz@codeaurora.org> | 2013-09-25 23:12:06 +0000 |
| commit | 2052f4843bb50400c0ab158213e546f3dd9be8ac (patch) | |
| tree | 36fa496a1e49b1aea1071efec63b1704b3c529e3 /llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
| parent | a9e303e7462f1748febd9622259db6915f97cc1b (diff) | |
| download | bcm5719-llvm-2052f4843bb50400c0ab158213e546f3dd9be8ac.tar.gz bcm5719-llvm-2052f4843bb50400c0ab158213e546f3dd9be8ac.zip | |
Fix PR 17368: disable vector mul distribution for square of add/sub for ARM
Generally, it is desirable to distribute (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 (add)
y = a * x (mul)
z = y + b * y (mla)
Without distribution:
x = a + b (add)
z = x * x (mul)
This patch checks if a mul is a square of add/sub. If yes, skip
distribution.
llvm-svn: 191410
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
0 files changed, 0 insertions, 0 deletions

