[PATCH] D32706: [AArch64] Consider lengthening instructions in cast cost calculation

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 11:04:37 PDT 2017


mssimpso created this revision.
Herald added subscribers: rengolin, aemerson.

The AArch64 instruction set has a few "lengthening" instructions (e.g., uaddl, saddl, etc.) that take doubleword operands and produce quadword results. The operands are automatically sign- or zero-extended as appropriate. However, In LLVM IR, these extends are explicit. This patch updates TTI to consider these lengthening instructions when determining the cost of sign- and zero-extends. If an extend is a part of a lengthening operation, it will be eliminated during code generation, so the reported cost should be zero.


https://reviews.llvm.org/D32706

Files:
  lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64TargetTransformInfo.h
  test/Analysis/CostModel/AArch64/lengthening-casts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32706.97309.patch
Type: text/x-patch
Size: 15652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170501/0bcae9f3/attachment.bin>


More information about the llvm-commits mailing list