[PATCH] D62250: [DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 12:03:49 PDT 2019


efriedma added a comment.

Makes sense



================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1213
+                   isa<StoreInst>(Inst)) {
           auto *Earlier = dyn_cast<StoreInst>(DepWrite);
           auto *Later = dyn_cast<StoreInst>(Inst);
----------------
`cast<>` instead of `dyn_cast<>`


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1219
+              (DL.getTypeStoreSizeInBits(EarlierVT) ==
+               DL.getTypeSizeInBits(EarlierVT)) &&
               Later && isa<ConstantInt>(Later->getValueOperand()) &&
----------------
If we don't already have a helper for "getTypeStoreSizeInBits == getTypeSizeInBits", we should add one to DataLayout.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62250





More information about the llvm-commits mailing list