[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 Jan 6 12:24:13 PST 2020


efriedma added a comment.

I think you need to check the elements are byte-sized?

I'm a little concerned we're doing this too early, and it will end up blocking optimizations like GVN (since it can't reason about the partially overlapping store).  Not sure how likely that is to trigger in practice, though.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1204
+         BBI != SI.getIterator(); ++BBI) {
+      if (StoreInst *MSI = dyn_cast<StoreInst>(&*BBI)) {
+        AliasResult Result =
----------------
AliasAnalysis has a dedicated method getModRefInfo() to compute the exact property you want without caring about the specific kind of instruction.


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