[PATCH] D148122: [AArch64][CostModel] Make sext/zext free if folded into a masked load

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 06:14:39 PDT 2023


david-arm created this revision.
david-arm added reviewers: sdesmalen, hassnaa-arm, MattDevereau, kmclaughlin.
Herald added subscribers: ctetreau, kristof.beyls.
Herald added a project: All.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The BasicTTIImpl implementation of getCastInstrCost ensures
that the cost of zext/sext is 0 when following a load if we
know the combined extending load is legal. For SVE we can do
the same for masked loads too, since they use exactly the
same underlying instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148122

Files:
  llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll
  llvm/test/Analysis/CostModel/AArch64/sve-ldst.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148122.512802.patch
Type: text/x-patch
Size: 13256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230412/d3680106/attachment.bin>


More information about the llvm-commits mailing list