[PATCH] D28254: [AArch64][CostModel] Improve cost for fsqrt intrinsics.

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 14:08:48 PST 2017


mcrosier created this revision.
mcrosier added reviewers: mkuper, RKSimon, mssimpso, MatzeB.
mcrosier added subscribers: llvm-commits, mssimpso.
Herald added subscribers: rengolin, aemerson.

This patch changes the cost of sqrt instrinsics for AArch64.

I have very limited knowledge of the cost model, so I tried to pick fairly conservative values as a starting point.  In looking at the ongoing work on the X86 side it appears these values reflect the latency of the instruction.  However, a discussion with @mssimpso led me to believe the AArch64 cost model doesn't directly use the instruction latencies.

Any input here would be greatly appreciated..

This change causes a hand full of additional cases in SPEC (e.g., povray) to be SLP vectorized.  In fact, this may only change codegen when targeting Kryo where insert and extract element operations are cheaper than most other sub-targets.

Chad


https://reviews.llvm.org/D28254

Files:
  lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64TargetTransformInfo.h
  test/Analysis/CostModel/AArch64/arith-fp.ll
  test/Transforms/SLPVectorizer/AArch64/intrinsic-cost-model.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28254.82945.patch
Type: text/x-patch
Size: 5770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170103/c9892afd/attachment.bin>


More information about the llvm-commits mailing list