[PATCH] D123006: [AArch64] Teach the costmodel about widening muls

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 3 13:56:39 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: jaykang10, NickGuy, SjoerdMeijer, fhahn.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

A vector `mul(sext, sext)` or `mul(zext, zext)` will be code generated as a single smull or umull instruction. This most notably effects v2i64 multiplies, which are otherwise not legal and need to be expanded.

The oneuse check has also been slightly changed, as it is already checked from the use of isWideningInstruction in getCastInstrCost.


https://reviews.llvm.org/D123006

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/AArch64/arith-widening.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123006.420082.patch
Type: text/x-patch
Size: 22413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220403/1bc877a0/attachment.bin>


More information about the llvm-commits mailing list