ScheduleDAGInstrs: Bug fix for missed memory dependency.
authorGeoff Berry <gberry@codeaurora.org>
Wed, 6 Jan 2016 18:14:26 +0000 (18:14 +0000)
committerGeoff Berry <gberry@codeaurora.org>
Wed, 6 Jan 2016 18:14:26 +0000 (18:14 +0000)
commit823b3b2fdb3c875231d5f2a11a7a771d8498f7af
treeddc5fe47c3b13afc935015fd0a87b913c67c3530
parent9a7a90005c54ca139b17fd768a2e5c505c91feef
ScheduleDAGInstrs: Bug fix for missed memory dependency.

Summary:
In buildSchedGraph(), when adding memory dependencies for loads, move
the call to adjustChainDeps() after the call to
addChainDependency(AliasChain) to handle the case where
addChainDependency(AliasChain) ends up not adding a dependency and
instead putting the SU on the RejectMemNodes list.  The call to
adjustChainDeps() must be done after the call to addChainDependency() in
order to process the SU added to the RejectMemNodes list to create
memory dependencies for it.

Reviewers: hfinkel, atrick, jonpa, resistor

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D15927

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256950 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ScheduleDAGInstrs.cpp
test/CodeGen/AArch64/arm64-misched-memdep-bug.ll [new file with mode: 0644]