Fix PR12599.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 20 Apr 2012 23:36:09 +0000 (23:36 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 20 Apr 2012 23:36:09 +0000 (23:36 +0000)
commit0b35c35efcc584c0a09ed70840bcca420f42be2f
tree809c1418d7fa7d0f96327204ee024b7601e204b6
parentd83c9ea7d10d8ea5ca8b6cb8a5227b747c505afc
Fix PR12599.

The X86 target is editing the selection DAG while isel is selecting
nodes following a topological ordering. When the DAG hacking triggers
CSE, nodes can be deleted and bad things happen.

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