Fix reassociate to use a worklist instead of recursing when new
authorDan Gohman <gohman@apple.com>
Tue, 12 Apr 2011 00:11:56 +0000 (00:11 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 12 Apr 2011 00:11:56 +0000 (00:11 +0000)
commitdac5dbadeb840ddded4665d144f31c5f88494d6e
tree5d662010a253bd229207ba978b6a4684fd958d47
parent164254d77c36a2f224987406d66f3bacfdbb7652
Fix reassociate to use a worklist instead of recursing when new
reassociation opportunities are exposed. This fixes a bug where
the nested reassociation expects to be the IR to be consistent,
but it isn't, because the outer reassociation has disconnected
some of the operands.  rdar://9167457

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129324 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/secondary.ll [new file with mode: 0644]