[PATCH] D46199: [SLPVectorizer] Debug intrinsics shouldn't affect spill cost

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 10:29:27 PDT 2018


davide created this revision.
davide added reviewers: aprantl, vsk, mssimpso, gberry, aemerson.
Herald added subscribers: JDevlieghere, hiraditya, qcolombet, rengolin.
Herald added a reviewer: javed.absar.

The SLPVectorizer doesn't skip DebugInfo instructions when computing the spill cost, although these instruction make no difference.

SLP: Spill Cost = 4.
SLP: Extract Cost = 0.
SLP: Total Cost = 2.
SLP: Found cost=2 for VF=2
SLP: Analyzing a store chain of length 2

vs

SLP: Spill Cost = 0.
SLP: Extract Cost = 0.
SLP: Total Cost = -2.
SLP: Found cost=-2 for VF=2
SLP: Decided to vectorize cost=-2

The proposed fix is to skip them.

Fixes PR37261 / rdar://problem/39794738


https://reviews.llvm.org/D46199

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/spillcost-di.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46199.144368.patch
Type: text/x-patch
Size: 5331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180427/3815efbb/attachment.bin>


More information about the llvm-commits mailing list