[PATCH] D30703: [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 10:45:20 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:301
+  OverwritePartialEarlierWithFullLater,
   OverwriteUnknown
 };
----------------
As a NFC pre-commit please can you  update these to match the style guide (OW_Begin ..... OW_Unknown)


================
Comment at: test/Transforms/DeadStoreElimination/merge-stores.ll:6
+; CHECK-LABEL: @combine_overlapping_stores
+define void @combine_overlapping_stores(i32 *%ptr) {
+entry:
----------------
filcab wrote:
> junbuml wrote:
> > I think the current code should handle this.
> This specific test is about making sure we still do the current optimization (remove a store that's later shadowed by other stores). The code I added doesn't fire on this one (and it shouldn't). I can probably move it to the combine-partial-overwrites.ll test to make it consistent, though.
> 
> Some of the tests there got changed due to this patch.
Commit test with current codegen? Is it feasible to use update_test_checks.py here?


https://reviews.llvm.org/D30703





More information about the llvm-commits mailing list