[ARM] Implement target hook function to decide folding (mul (add x, c1), c2)
commit63ca9371c7b4eb8fff01d998963cf901b658c7d4
authorBen Shi <powerman1st@163.com>
Tue, 7 Sep 2021 02:21:38 +0000 (7 10:21 +0800)
committerBen Shi <powerman1st@163.com>
Tue, 7 Sep 2021 07:42:43 +0000 (7 15:42 +0800)
treee2e529a89cad508108791ab70acb7dea3b0ce9a8
parent20f890696f10c13342bc1806f4ac9abb63d3153f
[ARM] Implement target hook function to decide folding (mul (add x, c1), c2)

Prevent the folding in DAGCombine if it leads to worse code.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D109124
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/test/CodeGen/ARM/addimm-mulimm.ll
llvm/test/CodeGen/ARM/urem-seteq-illegal-types.ll
llvm/test/CodeGen/Thumb/urem-seteq-illegal-types.ll