Fix PR14060, an infinite loop in reassociate. The problem was that one of the
authorDuncan Sands <baldrick@free.fr>
Sun, 18 Nov 2012 19:27:01 +0000 (19:27 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 18 Nov 2012 19:27:01 +0000 (19:27 +0000)
commitb8e1111fbf71766903d2fc7b158dc612df097ea3
tree67744ef41c524f66a1ae87abf7f950ea6d344c29
parent085f6a4ac201851b0c8edfce9847c5b236181f06
Fix PR14060, an infinite loop in reassociate.  The problem was that one of the
operands of the expression being written was wrongly thought to be reusable as
an inner node of the expression resulting in it turning up as both an inner node
*and* a leaf, creating a cycle in the def-use graph.  This would have caused the
verifier to blow up if things had gotten that far, however it managed to provoke
an infinite loop first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/crash.ll