OSDN Git Service

[DAG] check more operands for cycles when merging stores.
authorTim Northover <tnorthover@apple.com>
Wed, 24 Oct 2018 21:36:34 +0000 (21:36 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 24 Oct 2018 21:36:34 +0000 (21:36 +0000)
commit76616be80bbff8acf3e7b9090afecf9757ed2f63
tree28d38429fe3551da229019ca0625b41df27373fc
parent04070efcd23ad080cc51eb3b9a187c746814a80c
[DAG] check more operands for cycles when merging stores.

Until now, we've only checked whether merging stores would cause a cycle via
the value argument, but the address and indexed offset arguments are also
capable of creating cycles in some situations.

The addresses are all base+offset with notionally the same base, but the base
SDNode may still be different (e.g. via an indexed load in one case, and an
ISD::ADD elsewhere). This allows cycles to creep in if one of these sources
depends on another.

The indexed offset is usually undef (representing a non-indexed store), but on
some architectures (e.g. 32-bit ARM-mode ARM) it can be an arbitrary value,
again allowing dependency cycles to creep in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345200 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp