[PATCH] D21251: [TTI] The cost model should not assume illegal vector casts get completely scalarized

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 16:50:04 PDT 2016


mkuper created this revision.
mkuper added reviewers: sbaranga, jmolloy, hfinkel, RKSimon, delena.
mkuper added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.
Herald added a subscriber: aemerson.

If a vector cast gets split, it's quite possible that the resulting casts are legal and cheap.
So, instead of pessimistically assuming scalarization, we use the costs the concrete TTI provides for the split vector.

This looks like it does the right thing for AVX (a lot of overblown costs drop dramatically) - but I'm less sure about ARM.

http://reviews.llvm.org/D21251

Files:
  include/llvm/CodeGen/BasicTTIImpl.h
  test/Analysis/CostModel/AMDGPU/addrspacecast.ll
  test/Analysis/CostModel/ARM/cast.ll
  test/Analysis/CostModel/PowerPC/ext.ll
  test/Analysis/CostModel/X86/sitofp.ll
  test/Analysis/CostModel/X86/uitofp.ll
  test/Transforms/LoopVectorize/X86/gather_scatter.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21251.60426.patch
Type: text/x-patch
Size: 51508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160610/40200a15/attachment.bin>


More information about the llvm-commits mailing list