[DAGCombiner] Bugfix for lost chain depenedency.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 21 Nov 2015 13:25:07 +0000 (13:25 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 21 Nov 2015 13:25:07 +0000 (13:25 +0000)
commit546611e3987a8684f2c260d3793964494bf97950
tree41847544a81ec73a86730c7af6e539879bf931f2
parent26398a7d87609d3c60709b9df74bffb53e660a26
[DAGCombiner] Bugfix for lost chain depenedency.

When MergeConsecutiveStores() combines two loads and two stores into
wider loads and stores, the chain users of both of the original loads
must be transfered to the new load, because it may be that a chain
user only depends on one of the loads.

New test case: test/CodeGen/SystemZ/dag-combine-01.ll

Reviewed by James Y Knight.

Bugzilla: https://llvm.org/bugs/show_bug.cgi?id=25310#c6

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