Fix a bug in the DAGCombiner's handling of multiple linked
authorDan Gohman <gohman@apple.com>
Mon, 10 Aug 2009 23:43:19 +0000 (23:43 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 10 Aug 2009 23:43:19 +0000 (23:43 +0000)
commit00edf39b3447db1b8dc0030d716ef70675f55755
treefd3bdbf3b6f17cfd872ba70406d8833230946c15
parenta407ca16c29b4e91ef3cf9e188ac2e3ab6920cd8
Fix a bug in the DAGCombiner's handling of multiple linked
MERGE_VALUES nodes. Replacing the result values with the
operands in one MERGE_VALUES node may cause another
MERGE_VALUES node be CSE'd with the first one, and bring
its uses along, so that the first one isn't dead, as this
code expects. Fix this by iterating until the node is
really dead. This fixes PR4699.

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