]> granicus.if.org Git - llvm/commit
[SDAG] Relax conditions under stores of loaded values can be merged
authorNirav Dave <niravd@google.com>
Wed, 10 May 2017 19:53:41 +0000 (19:53 +0000)
committerNirav Dave <niravd@google.com>
Wed, 10 May 2017 19:53:41 +0000 (19:53 +0000)
commita7aa63a594edfea5321d289b05e074e41c167312
tree7a5975537fa465ae19f8665cbe93c2b0d3cde468
parent63eb7ab316525856e88d35e0341c2cf87d701504
[SDAG] Relax conditions under stores of loaded values can be merged

Summary:

Allow consecutive stores whose values come from consecutive loads to
merged in the presense of other uses of the loads. Previously this was
disallowed as in general the merged load cannot be shared with the
other uses. Merging N stores into 1 may cause as many as N redundant
loads. However in the context of caching this should have neglible
affect on memory pressure and reduce instruction count making it
almost always a win.

Fixes PR32086.

Reviewers: spatel, jyknight, andreadb, hfinkel, efriedma

Reviewed By: efriedma

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302712 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/ISDOpcodes.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/merge_store_duplicated_loads.ll