OSDN Git Service

[X86] In PostprocessISelDAG, start from allnodes_end, not the root.
authorCraig Topper <craig.topper@intel.com>
Fri, 19 Oct 2018 19:24:42 +0000 (19:24 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 19 Oct 2018 19:24:42 +0000 (19:24 +0000)
commit582cb39ac306b0eb355c582df76f77424dbc1e1c
tree11d0f317a90e8dd398f9d7309dcf84ddc6202578
parent3b86c68554418cc2e731a8521b7329feed6f21a3
[X86] In PostprocessISelDAG, start from allnodes_end, not the root.

There is no guarantee the root is at the end if isel created any nodes without morphing them. This includes the nodes created by manual isel from C++ code in X86ISelDAGToDAG.

This is similar to r333415 from PowerPC which is where I originally stole the peephole loop from.

I don't have a test case, but without this a future patch doesn't work which is how I found it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344808 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp