[PATCH] D109124: [ARM] Implement target hook function to decide folding (mul (add x, c1), c2)

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 07:13:22 PDT 2021


dmgreen added a comment.

Could this use ConstantMaterializationCost from ARMBaseInstrInfo for the costs of materializing the constants? That way it should just work with any architecture or constants, with some simple checking for which will produce the lowest total cost. It might need to include isLegalAddImmediate too, but that should be handling Thumb and Arm already too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109124/new/

https://reviews.llvm.org/D109124



More information about the llvm-commits mailing list