[PATCH] D30438: SplitKit: Correctly implement partial copies

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 14:47:47 PDT 2017


MatzeB marked 2 inline comments as done.
MatzeB added inline comments.


================
Comment at: lib/CodeGen/SplitKit.cpp:572
+
+      if (BestIdx == 0)
+        report_fatal_error("Impossible to implement partial COPY");
----------------
kparzysz wrote:
> MatzeB wrote:
> > kparzysz wrote:
> > > Would it make sense to add `|| BestCover <= 0`?
> > `BestCover <= 0` can happen and is fine (it just means the best we could find is an index that covers more unnecessary lanes that we already covered anyway, than lanes we haven't covered yet).
> Well, wasn't that the original problem, i.e. that we copied too much (which then ended up clobbering lanes marked as unused)?
No, the PossibleIndexes vector only contains indexes that cover bits that we are allowed to cover. The BestCover is solely about minimizing the amount of lanes we copy twice. We will not copy lanes that we are not supposed to copy.


Repository:
  rL LLVM

https://reviews.llvm.org/D30438





More information about the llvm-commits mailing list