diff options
author | zhongyunde <zhongyunde@huawei.com> | 2022-10-07 19:31:48 +0800 |
---|---|---|
committer | zhongyunde <zhongyunde@huawei.com> | 2022-10-07 19:33:47 +0800 |
commit | 75358f060c099c9a290cea43eb15f872ab7f2343 (patch) | |
tree | f9d417ef73aab2695468cdffdce876fcc77d0215 /clang/lib/Basic/SourceManager.cpp | |
parent | d85f6e5d57f38f0cbbc756484e3a93ae89b11195 (diff) | |
download | llvm-75358f060c099c9a290cea43eb15f872ab7f2343.zip llvm-75358f060c099c9a290cea43eb15f872ab7f2343.tar.gz llvm-75358f060c099c9a290cea43eb15f872ab7f2343.tar.bz2 |
[AArch64] Lower multiplication by a constant int to madd
Lower a = b * C -1 into madd
a) instcombine change b * C -1 --> b * C + (-1)
b) machine-combine change b * C + (-1) --> madd
Assembler will transform the neg immedate of sub to add, see https://gcc.godbolt.org/z/cTcxePPf4
Fixes AArch64 part of https://github.com/llvm/llvm-project/issues/57255.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D134336
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions