[PATCH] D67234: [MergedLoadStoreMotion] Sink stores if they have common GEP
Denis Bakhvalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 11:04:47 PDT 2019
dendibakh created this revision.
dendibakh added reviewers: bjope, lebedev.ri, davide.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
dendibakh edited the summary of this revision.
If 2 stores in the diamond have common GEP:
bb1:
%tmp = getelementptr inbounds i32, i32* %arg1, i64 1
br i1 %arg2, label %bb2, label %bb3
bb2: ; preds = %bb1
store i32 42, i32* %tmp, align 4
br label %bb4
bb3: ; preds = %bb1
store i32 42, i32* %tmp, align 4
br label %bb4
bb4: ; preds = %bb2, %bb3
ret void
Stores will be sunk into %bb4.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67234
Files:
llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
llvm/test/Transforms/InstMerge/st_sink_no_geps.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67234.218955.patch
Type: text/x-patch
Size: 5752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190905/b86b15f3/attachment.bin>
More information about the llvm-commits
mailing list