[PATCH] [AArch64] Improve the target-specific cost model to better handle signed division by a power of 2.

Chad Rosier mcrosier at codeaurora.org
Tue Sep 23 10:03:53 PDT 2014


Hi grosbach, t.p.northover, Jiangning, jmolloy,

This patch improve the target-specific cost model to better handle signed division by a power of 2. The immediate result is that this enables the SLP vectorizer to do a better job.

The ADD/CMP/SELECT/SRA is the expansion for the scalar version, which was added in r213758.  I assume this is the cost we should return. The generated vector code still uses the target-independent series of SRA/SRL/ADD/SRA, however.  I may need to clarify the comments, so suggestions are welcome.

We could also investigate using the ADD/CMP/SELECT/SRA combination for vectors, but that would require additional performance evaluation (and I think it's an orthogonal issue).

This should address PR20714.

 Chad

http://reviews.llvm.org/D5469

Files:
  lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  test/Transforms/SLPVectorizer/AArch64/sdiv-pow2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5469.13999.patch
Type: text/x-patch
Size: 3550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140923/1822d443/attachment.bin>


More information about the llvm-commits mailing list