[PATCH] D71828: [InstCombine] Convert vector store to scalar store if only one element updated

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 14:58:57 PDT 2020


efriedma added a comment.

In D71828#2080937 <https://reviews.llvm.org/D71828#2080937>, @lebedev.ri wrote:

> In D71828#2080810 <https://reviews.llvm.org/D71828#2080810>, @efriedma wrote:
>
> > One thing I've realized reading this thread again is that it's not only the compiler that can get confused by a wrong-width store; the CPU itself can also run into issues with store->load forwarding.  See recent discussion http://lists.llvm.org/pipermail/llvm-dev/2020-May/141837.html .  So whether this transform is worthwhile might depend on the context.
>
>
> Right. And if we know problematic context/conditions, we can always perform reverse fold later on, in backend. Correct?


The C memory model doesn't allow reversing the fold in a lot of cases without encoding more information in the IR.  Also, I'm not sure what the heuristic looks like, so I'm not sure how hard it is to compute in the backend.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71828/new/

https://reviews.llvm.org/D71828





More information about the llvm-commits mailing list