OSDN Git Service

[SelectionDAG] set dereferenceable flag in MergeConsecutiveStores to fix assetion...
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Tue, 27 Jun 2017 12:43:08 +0000 (12:43 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Tue, 27 Jun 2017 12:43:08 +0000 (12:43 +0000)
commit903642ae3c9775542c77c67f9ff96637831d5d6b
treedb5fb70a65035051a912897cbf53000907610ac4
parentae1022198b4de754c4e839a2429fd77acdfbfbca
[SelectionDAG] set dereferenceable flag in MergeConsecutiveStores to fix assetion failure

When SelectionDAG merges consecutive stores and loads in MergeConsecutiveStores, it does not set dereferenceable flag for a created load instruction. This results in an assertion failure if SelectionDAG commonizes this load instruction with other load instructions, as well as it may miss optimization opportunities.

This patch sat dereferenceable flag for the newly created load instruction if all the load instructions to be merged are dereferenceable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306404 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/PowerPC/merge_stores_dereferenceable.ll [new file with mode: 0644]