[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
commitf69fb7ac7226c68731ad702b4eac6f5706aadbc9
authorBen Shi <powerman1st@163.com>
Thu, 19 Aug 2021 13:51:09 +0000 (19 21:51 +0800)
committerBen Shi <powerman1st@163.com>
Sun, 22 Aug 2021 08:53:32 +0000 (22 16:53 +0800)
treef35d2826add89ebe495266c2edf69d06fa06c43d
parentdda116bc3d9c126b3c962563fc80ae332d42801d
[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)

Reviewed by: lebedev.ri, spatel, craig.topper, luismarques, jrtc27

Differential Revision: https://reviews.llvm.org/D107711
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/addimm-mulimm.ll