]> granicus.if.org Git - llvm/commit
NewGVN: Fix PR/33187. This is a bug caused by two things:
authorDaniel Berlin <dberlin@dberlin.org>
Tue, 6 Jun 2017 17:15:28 +0000 (17:15 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Tue, 6 Jun 2017 17:15:28 +0000 (17:15 +0000)
commit2d73c379ee935b9194063126a8b1ae45e9f9a100
tree5a67929fe13e0a5fc8fff287367c14eed882c745
parentbacc83353bcc4e4c869e1f23f47513d1ddf44622
NewGVN: Fix PR/33187.   This is a bug caused by two things:
1. When there is no perfect iteration order, we can't let phi nodes
put themselves in terms of things that come later in the iteration
order, or we will endlessly cycle (the normal RPO algorithm clears the
hashtable to avoid this issue).
2. We are sometimes erasing the wrong expression (causing pessimism)
because our equality says loads and stores are the same.
We introduce an exact equality function and use it when erasing to
make sure we erase only identical expressions, not equivalent ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304807 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Scalar/GVNExpression.h
lib/Transforms/Scalar/NewGVN.cpp
test/Transforms/NewGVN/completeness.ll
test/Transforms/NewGVN/pr32403.ll
test/Transforms/NewGVN/pr32897.ll
test/Transforms/NewGVN/pr33187.ll [new file with mode: 0644]